A React boilerplate that comes with a custom CLI for increased productivity and that is designed for scalable and high-performance web applications.
This project includes a custom CLI for generating components & features. The CLI can handle a lot of the redux boilerplate for you. First mark the scripts as executable (with the command chmod +x ./cli/*
) and you’re good to go.
npm run make:component COMPONENT_NAME
npm run make:connected_component COMPONENT_NAME
This will do the same as make:component
but connects the component to the redux store.
npm run make:feature FEATURE_NAME FEATURE_TYPE FEATURE_URL
action
with the given name and typereducer
for the created actionsagas
file for the created actionservices
file for making an API callExamples:
npm run make:component Button
npm run make:connected_component Container
npm run make:feature books getBooks GET_BOOKS
npm run make:feature users getUsers GET_USERS www.example.com/api/users
Try it out to see how it looks or check the code_templates
folder. You can customize these files to your own needs.
Firebase is built on Google infrastructure and scales automatically, for even the largest apps. To use Firebase in your application follow these steps:
constants.js
and fill in your projects credentials to the firebaseConfig
object.This boilerplate comes with a AuthenticatedRoute helper so you can easily redirect users that are not logged in. Inside this component we check if an user object is present inside the auth
state in the store to determine if the user should be redirected to /sign_in
.
This boilerplate comes with a notification component that will show users success and error messages. You can easily use this component for all kinds or notifications you want to show to your users. It works for different type of messages like success, error, warning and info. You can find the messagesTypes
inside constants.js
.
This component will look at the Redux store to see if there are any messages
present. If so, it will show op the Notification component with the text that is present in the store. Clicking the component will call the clearMessages
action that will remove all the messages
from the store.
If you want to show an error message when fetching some data from an API goes wrong, you simply add a message
object (with a type
and a text
) to the fail action inside the saga
React Milkshake is a boilerplate for kick-starting your new projects. It is not a component library and does not come with a template or theme. But, it does come with a couple of styled components, like a sidebar layout or card component, that you can use to quickly develop your application. If you want to set your own theme colors and styling, just customize the theme.js
file. These variables will be available in every component (thanks to the ThemeProvider
inside index.js
).
This project was bootstrapped with Create React App.
In the project directory, first run yarn
or npm install
, then run yarn start
or npm start
.