A TMDb demo powered by Create React App (CRA)
The README generated by Create React App was moved to README-CRA.md
Β§ Online demo
Click here.
Β§ Features
- 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
$ Quick Start
$ git clone https://github.com/kenberkeley/tmdb-react.git
$ cd tmdb-react/
# Install dependencies
$ npm i
# Run!
$ npm start
Then open http://localhost:3000
$ Project Structure
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)
Β§ Deployment
$ npm run deploy
Check out Deployment (CRA Doc) for more information.
Β§ TODO
- Testings (Unit & E2E)
- Responsive layout