Skip to content

Creating a React App from Zero to One

Shaung Cheng edited this page Mar 3, 2020 · 8 revisions
  1. npx create-react-app <project name> --template typescript
  2. Create a repo on github, push files to github (create react app already setup local git for you)
  3. Setup routing npm install react-router-dom @types/react-router-dom -S, then refer to react router basic example and replace contents in App.tsx.
  4. Prepare for github page deployment. npm i -D gh-pages, then set two script commands in package.json: "predeploy": "npm run build", and "deploy": "gh-pages -d build". Refer to facebook github page deployment, also refer to this repo page if needed.
  5. Ready to deploy to github page with custom domain. Follow these steps.

More