Giter Site home page Giter Site logo

bradgarropy / plop-generator-react-hook Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 928 KB

A plop generator for React hooks.

Home Page: https://www.npmjs.com/package/@bradgarropy/plop-generator-react-hook

License: MIT License

JavaScript 16.48% TypeScript 65.97% Handlebars 5.43% CSS 12.11%
node typescript eslint prettier jest plop plop-pack plop-generator react

plop-generator-react-hook's Introduction

๐Ÿ’ง plop generator react hook

version downloads size github actions coverage typescript contributing contributors discord

A plop generator for react hooks.

๐Ÿ“ฆ Installation

This package is hosted on npm.

npm install --save-dev @bradgarropy/plop-generator-react-hook

๐Ÿฅ‘ Usage

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

โ” Questions

๐Ÿ› report bugs by filing issues
๐Ÿ“ข provide feedback with issues or on twitter
๐Ÿ™‹๐Ÿผโ€โ™‚๏ธ use my ama or twitter to ask any other questions

โœจ contributors


Brad Garropy

๐Ÿ’ป ๐Ÿ“– โš ๏ธ ๐Ÿš‡

plop-generator-react-hook's People

Contributors

bradgarropy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.