-
Notifications
You must be signed in to change notification settings - Fork 0
Creating a React App from Zero to One
Shaung Cheng edited this page Mar 3, 2020
·
8 revisions
npx create-react-app <project name> --template typescript
- Create a repo on github, push files to github (create react app already setup local git for you)
- Setup routing
npm install react-router-dom @types/react-router-dom -S
, then refer to react router basic example and replace contents inApp.tsx
. - Prepare for github page deployment.
npm i -D gh-pages
, then set two script commands inpackage.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. - Ready to deploy to github page with custom domain. Follow these steps.