Day 2 React Notes
Day 2 React Notes
Environment Setup
browser
***********************************************************************************
***
npm is a package manager for the JavaScript programming language maintained by npm,
Inc. npm is the default package manager for the JavaScript runtime environment
Node.js
and is included as a recommended feature in the Node.js installer. Wikipedia
cd
Isaac Z. Schlueter
Written In JS
Free
open source
https://nodejs.org/en
node -v
npm -v
npm init
npm config
npm start- Helps start react application
npm test
npm i /install
npm uninstall
npm update
***********************************************************************************
*
babel- Js transpiler or js compiler
free,open source
popular tool of js
Transform syntax
Array.includes()
let age=20;
var age=20;
***********************************************************************************
*********
Webpack-
Is a JS Module Bundler
Bundling JS,CSS files for usage on browser
webpack:{
start:index.js,
script:index.js
style:[]
}
*********************************************************
Separate Installation
npm i react
npm i react-dom
npm i @babel/standalone
************************************************
************************************************************
npm init
cd my-app
***********************************************************************************
*******
Install-
react
react-dom
react-scripts
babel
jest
webpack
Installing All the dependencies which we need to run first basic react application
npm init
npx create-react-app myapp
cd myapp
npm start
*****************************************************************************
package.json- meta data about your project i.e complete overview/summary of your
react application
manifest.json-
robots.txt-
***********************************************************************************
Angular- JS FW- Google -2016
TS-superset of js
Framework
predefined structure need to follow while development
limitations
No freedom
difficult to learn
- Other features
others- pipes,decorators,directives.....
testing- enzyme
mobile app- Ionic
************************************************************88
Build complete end to end application (MVC)
https://data-flair.training/blogs/angularjs-mvc/
*****************************************
********************************************************
Virtual DOM- Its updating and rendering results faster than regular dom
eg
When UI element render- Create VD copy -> if state of object changed->create new
copy of VD
execution flow-
*******************************************************************
semantic Versionining
//^- automatically installing or updating minor version along with patch version
//~ - installing most recent patch version
//@- to install specific version
18.2.0-major.minor.patch
^18.2.0-