@yobgob/too-many-hooks
v0.0.1
Published
Collection of typed React hooks
Readme
too-many-hooks
This directory contains a Vite app which builds to the too-many-hooks library
Building
Install / update dependencies with:
yarn installThen, build the library with:
yarn buildThe built package will output to /dist.
Tooling
- Build - The application is built using Vite, configured with /
vite.config.ts - Formatting - Prettier configured with
/.prettierrc.cjs - Linting - ESLint configured with
/.eslintrc.cjs
Scripts
build- builds the library to/distformat- formats all files with Prettierlint:code- lints all code in/srcwith ESLintlint:formatting- checks that all code meets Prettier standardslint:types- checks all typeslint- runs all linting commands
Structure
All hooks are contained in the /src directory. Each has its own use<Hook>.ts file which declares and exports the hook and all of its types. These are all subsequently exported from the top-level src/index.ts.
Documentation
All hooks and types have block comments that adhere to JSDoc standards with the goal of adhering to TSDoc in the future. For functions this includes usage examples where possible.
