get started:
- initialise repo on github
gh repo clone DanielChou333/snakeinto local machine, so now you have a folder on your computer .../snake- outside the snake folder,
npx create-react-app snakeand it will install react packages and stuff inside the cloned empty repo npm startto start making app
working on the app:
- start with outermost component (App> Background > Container > status+...)
- ran into JSX not compiling
- first guess: babel is not installed? use
npm install --save-dev @babel/preset-reactto install, problem persists. - after searching on stack-overflow, its because compiler did not parse the bracket () on the new line. To fix, put bracket right after return like so:
return(/*new line*/ )
- first guess: babel is not installed? use