A template for React apps.
- fork this repo
- clone this repo
- open a terminal to the root of the repo
- execute
npm init
- fill out the requested info
- execute
npm install --save
to install the dependencies for your app - open
src/index.html
- change the title and add any content that must be loaded before the React app loads
- save the file
- open
src/index.js
- edit the routes and add any content needed to define your routes such as additional imports
- save the file
- open
src/reducer.js
- edit the initial state and add additional logic to your reducer
- save the file
- open
src/App.js
- edit your app component as needed and add any additional content
- save the file
- open
src/styles.css
- add additional styles as needed
- save the file
- execute
npm run build
- execute
npm start
- visit http://localhost:8000/ in your web browser
Note: For better organization, place the root component for each route in their own file inside the src/routes
folder. Place all other components in their own file inside the src/components
folder.
- execute
npm run deploy
to create a production build - serve the contents of the
public
folder with the web server of your choice