@piperguy/plop-generator-react-hook
v0.1.0
Published
π§ plop generator react hook
Downloads
2
Maintainers
Readme
π§ plop generator react hook
A plop
generator for react
hooks.
π¦ Installation
This package is hosted on npm
.
npm install --save-dev @piperguy/plop-generator-react-hook
π₯ Usage
First, be sure you have plop
installed. Then, add the following line to your plopfile.js
.
plop.load("@piperguy/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
β Questions
π report bugs by filing issues
π’ provide feedback with issues or on twitter
ππΌββοΈ use my [ama][ama] or twitter to ask any other questions