@piperguy/plop-generator-react-hook
TypeScript icon, indicating that this package has built-in type declarations

0.1.0Β β€’Β PublicΒ β€’Β Published

πŸ’§ 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][ama] or twitter to ask any other questions

/@piperguy/plop-generator-react-hook/

    Package Sidebar

    Install

    npm i @piperguy/plop-generator-react-hook

    Weekly Downloads

    4

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    9.34 kB

    Total Files

    13

    Last publish

    Collaborators

    • piperguy