๐Ÿ’ง plop generator react context

September 21, 2021 ยท View on GitHub

version downloads size github actions coverage typescript contributing contributors discord

A plop generator for react context.

๐Ÿ“ฆ Installation

This package is hosted on npm.

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

๐Ÿฅ‘ Usage

First, be sure you have plop installed. Then, add the following line to your plopfile.js.

plop.load("@bradgarropy/plop-generator-react-context")

Now you'll have access to the context generator as shown below.

plop context

The context generator scaffolds a new context, including a consumer hook, and adds it to the index.ts file for easy importing. The resulting directory looks like this for a context named App.

src
โ””โ”€โ”€ context
   โ”œโ”€โ”€ App.tsx
   โ””โ”€โ”€ index.ts

โ” 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

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