Chapter 3 Flashcards
1
Q
React build workflow. Why and how?
A
Why?
Optimize code (less no of lines)
Use next gen js features
More productive. Auto css prefixing
Linting. Let us know when we are using suboptimize workflow.
How?
Dependency management tool - yarn or npm
Use bundler (buildsteps) - recommended webpack
Use compiler so that new code works on old browser- babel
Use a development server
2
Q
Create react app.
A
A tool to create a react app.
Npm install -g create-react-app
Create-react-app my-app —scripts-version 1.1.5
It will have react, react-scripts and react dom as dependencies
3
Q
General dependency
A
Package.json