React tutorial in Hindi #25 componentDidUpdate life cycle method in ReactJs

preview_player
Показать описание
In this react js tutorial for beginners series we learn the component Did Update life cycle method react js which is very important method for interviews question in react class component. This video is made by anil Sidhu in the Hindi Language.

Playlist for complete React series in Hindi

component Did Update life cycle video steps,
Life cycle method
Use of componentDidUpdate Method.
Make Class component.
Use with state and props.
Previous Props and State.
Interview Question.
Рекомендации по теме
Комментарии
Автор

yes we can call api in componentDidUpdate function with conditions otherwise it will run infinite times. if our requirement is that when someone click on the button to update some infromation so we have to call the api for update the information but we have to make sure we will call the api in componentDidUpate function with some condition.., please correct if i am wrong.

shorttutorials
Автор

Going good also provide short ReactJS projects

funnyvoiceover
Автор

yeah we can call api inside componentDidMount. because sometimes we need to call api based on state change like when we need to search user's data from data base at that time we should call api inside componentDidMount method.


if I am wrong please correct me.

manishkarki
Автор

Wait and watch at 11:56 there need a correction u said componentDidMount while there u have to say componentDidUpdate. This might confuse beginners.

zeeshanrizwan
Автор

sir compoundDidUpdate aur render me difference kya reh gya jab dono state aur prop ke change hone pe update hota hai
??

sreejanagrahari
Автор

very useful video sir thank you so much

satyendrarajpoot
Автор

I think when we want update api then we update api in componentDidUpdate and call api

myaccount
Автор

Hello, please provide complete MERN stack tutorials.

mridulsharma
Автор

git hub code of component Did Update life cycle is not avaliable.

ananthapuneethchowdary
Автор

componentDidUpdate me update ke lite ham api call kar sakte hai

Creator-clvs
Автор

Anil Sir or Anyone please help,
i search everywhere but didn't found any specific neat and clean solution of :
"How to use componentDidUpdate(preProps) in class/functional component"
Means like you used preState as :

componentDidUpdate(preProps, preState, snapshot) {
if (preState.name == this.state.name) console.log("No need to access database");
else console.log("Need to access databse for update");
}

i want to use preProps like that, is it possible ? (without Hooks (i dont know about hooks yet ))
Please sir reply

labibnoob
Автор

No we should not call api inside componentdidupdate it will call api when ever state is updated

vishalsutar
Автор

Its very complicated i can understand that component did update runs after state is updated then why to use it to update state, please someone tell me ..

mayankmishra
Автор

apne jo video last me shouldComponentUpdate() ka bataya wo clear nai hua ese chota sa batane pe.... please kisi video me thik se smjha dijie???

kodakstudiowebs
Автор

Hello what are prerequisite to learn react js

adarshsoni
Автор

componentDidUpdate method mai issliye nhi karna chahiye kyu ki re-render problem face karna pardta hai iss liye componentDidMount method ka use karna chahiye.

vanshkhanna
Автор

kya ham props se get ki hui value setState click event se change nai ker sakte?? uske lie useState hi use hoga???

kodakstudiowebs
Автор

Can anyone tell me why I got console.log twice?

afrozalam
Автор

I think you are saying wrong @ 12.01 //we can not strop componentDidMount

ROHANPAGAR
Автор

sir insta account per reply nahi kya apne

muhammadjamal