React Component Generator

Following our latest Community Demo
I think its a good time to introduce generator-react-domain
A Generator that helps you create connected React components with Domain file structure.
The main goal here is to reduce boilerplate and save time. Files have content by prewritten templates, which can be replaced with your own templates.
Test files are using the well documented @sharvit package react-redux-test-utils

Usage in Foreman

  1. Create a .yo-rc.json file in the root folder and copy the following:
{
  "generator-react-domain": {
    "componentsPath": "webpack/assets/javascripts/react_app/components",
    "templatesPath": "path to your templates folder", # if needed
  }
}
  1. then use these commands to run it
npm run create-react-component            # create a component.
npm run create-react-component -- --redux # create a connected component

For more details, go to Github

2 Likes