Link: https://www.youtube.com/watch?v=Ke90Tje7VS0&t=4373s
React is a Javascript framework for user interfaces. React reacts to state changes.
- Install NodeJS
- npm uninstall create-react-app
- npm uninstall -g create-react-app
- npm install -g create-react-app@1.5.2
- create-react-app --help //to check if installed correctly, should return the help info
- create-react-app react-app --scripts-version=react-scripts@1.1.4
- cd react-app
- npm start
If already have the repo files, then just:
- cd react-app
- npm i
- npm start
For git commands:
git status //Displays current branch and more important info
Commits and pushes:
git commit -a -m 'React Template + Index.js HelloWorld + comments' git push origin
Branches: git checkout RB_1-HelloWorld //Change to RB_1-HelloWorld branch git checkout -b RB_1-HelloWorld //Creates and changes to RB_1-HelloWorld branch git branch -d RB_1-HelloWorld //Deletes RB_1-HelloWorld branch
Merge branches: git checkout master //Base branch git merge RB_1-HelloWorld //Branch to merge into base branch
//BONUS: git mergetool //For graphical tool to resolve conflicts and merge branches.
//git commands all in one script git add . git commit -a -m "General fixes in conflicts" git push --set-upstream origin RB_17-lifecycle-hooks
git checkout dev git merge RB_17-lifecycle-hooks git branch -d RB_17-lifecycle-hooks git checkout -b RB_17-lifecycle-hooks npm run start