The README generated by Create React App was moved to README-CRA.md
Click here.
- Basics: React + React Router + React Helmet + Axios
- State management: Rematch (a better Redux)
- UI lib: Bulma + Font Awesome 5
- Get rid of
../../../
by link-module-alias - Auto polyfill for old browsers, powered by Polyfill.io
$ git clone https://github.com/kenberkeley/tmdb-react.git
$ cd tmdb-react/
# Install dependencies
$ npm i
# Run!
$ npm start
Then open http://localhost:3000
For the whole project structure, please turn to Folder Structure (CRA Doc).
Only src/
will be elaborated below.
# Trivial folders/files had been omitted
src/
โโโ assets/
โโโ constants/ # All global scope keys (URL query, storage, etc) should go here to avoid name collisions
โโโ layouts/
โ โโโ default/
โ โโโ comps/ # Use by default layout only
โ โ โโโ Header.js
โ โโโ index.js
โโโ pages/
โ โโโ home/
โ โ โโโ comps/ # Use by home page only
โ โ โโโ index.js
โ โโโ watchlist/
โ โ โโโ comps/
โ โ โโโ index.js
โ โโโ index.js # routes config
โโโ store/ # https://github.com/rematch/rematch
โ โโโ models/
โ โโโ index.js
โโโ types/ # Centralized proptypes (https://bit.ly/2G3V6Ou)
โโโ utils/
โโโ App.js
โโโ index.js
Reference:
- Folder-by-type or Folder-by-feature (Stack Exchange)
- How to better organize your React applications? (Medium)
- Why using nested connect(react-redux) components is good? (Medium)
$ npm run deploy
Check out Deployment (CRA Doc) for more information.
- Testings (Unit & E2E)
- Responsive layout