Skip to main content

Posts

Showing posts from December, 2021

Insta Asset R Native

 Insta Asset R Native Mm

Node.js Notes

Node.js Notes Node js handle request asynchronously using single thread. Waiter(Thread) : Table1 (Request 1)                               Table 2 (Request 2) Thread read request 1 and wait for response at the same time goes to table 2 and process there request and if event queue alert with request is processed of table 1 then it response to table 1 and so on. Node should be used for real time application where we need data intensivity. not for cpu intensive application Installation : npm i npm i express --save npm i -g nodemon (For auto rerun) npm i --save-dev nodemon (For dev dependency save for development purpose)

Topic Learned!

 Topic Learned! State : State is updated whenever user want to update it. Example : ToDo List Props:           Props would be whatever the current state is! useEffect:            componentDidMount() {             // Run This code while the app is loading          Example fetchUser();      } Alternative For componentDidMount(): In functional components    //On Every Render   useEffect (() => {     console . log ( "I re-rendered" );   }); Alternative For componentDidMount() but runs only in first Render: //On First Render/Mount - componentDidMount   useEffect (() => {     console . log ( "Component Is Mounted" );   }, []); Alternative for componentDidUpdate(): //On First Render + whenever the component changes   //componentDidUpdate alternative   useEffect (() => {   ...