What is ReactGen?
ReactGen generates a React project to help you start developing a new application quickly. ReactGen is similar to (and based on) create-react-app but restructures the generated project so that it can easily be embedded into a back-end application written in Rails or Phoenix. It also adds the pieces that we normally use in our React apps at Zeal, including a modular component structure, Redux, CSS Modules, Sass, Apollo, and a stricter ESLint configuration.
Why ReactGen?
Our team realized that again and again, we were reaching for the same tools as we built out new projects. So instead of manually installing those common tools every time, we created ReactGenerator. Its single command saves time by getting us to a point where we can start writing code much quicker.
Installation
ReactGen is built on top of Yeoman, so you’ll need to install yo, its command-line interface along with ReactGen
Yarn
# If necessary, create new directory and `cd` into it; mkdir myApp && cd myApp
# Run the generator
yo react-zeal
# Install
yarn
# start your app on http://localhost:3000 yarn start
Npm
# If necessary, create new directory and `cd` into it; mkdir myApp && cd myApp
# Run the generator
yo react-zeal
# Install
npm install
# start your app on http://localhost:3000 npm start
Getting Started
ReactGen places all of the front-end code in a client directory, making it easy to embed your React application inside of a back-end application. However, it can still be run as a standalone application if that’s what your project requires.For more details, see the full project documentation on GitHub.
Support
We use GitHub issues to manage feature requests and bug reports for this project.
Here is an example application utilizing the React Generator with the Phoenix framework.