0.1.0 ā€¢ Published 10 months ago

@piperguy/plop-generator-react-hook v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

šŸ’§ plop generator react hook

version downloads size github actions coverage typescript contributing contributors

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 or twitter to ask any other questions