A plop
generator for react
hooks.
This package is hosted on npm
.
npm install --save-dev @bradgarropy/plop-generator-react-hook
First, be sure you have plop
installed. Then, add the following line to your plopfile.js
.
plop.load("@bradgarropy/plop-generator-react-hook")
Now you'll have access to the hook
generator as shown below.
plop hook
The hook
generator scaffolds a hook, including tests, and adds it to the index.ts
file for easy importing. The resulting directory looks like this for a hook named useHook
.
src
โโโ hooks
โโโ index.ts
โโโ useHook
โโโ index.ts
โโโ useHook.tsx
โโโ useHook.test.tsx
๐ report bugs by filing issues
๐ข provide feedback with issues or on twitter
๐๐ผโโ๏ธ use my ama or twitter to ask any other questions
Brad Garropy ๐ป ๐ |