GitHunt
W3

w3cj/use-x

Practice implementing custom react hooks with full test suites and examples.

use-x

Practice implementing custom react hooks with full test suites and examples.

Hooks

  • useFetch
    • Manage the error, loading and data state of fetch

Setup

Install dependencies

pnpm i

Enable tests

All tests are skipped by default. To enable a test, remove .skip

- it.skip("should test the hook", async () => {
+ it("should test the hook", async () => {
  // codes here
});

Run all tests

pnpm test

Run a specific test suite

pnpm test ./src/path/to/test/file/use-hook.test.ts

Languages

TypeScript95.5%JavaScript2.2%HTML2.1%CSS0.3%

Contributors

MIT License
Created October 16, 2024
Updated December 23, 2025
w3cj/use-x | GitHunt