React State Not Updating Immediately FIXED in HINDI using React Hooks 🔥

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

The solution you gave is true for your given example, but incase of multiple cards and their states, useEffect often goes in infinite render. That is the issue.

atharvajoshi
Автор

Thanks Bhai, code chla diya tumne mera sahi se. 2 din se preshan tha

rajann
Автор

Thanks it's very useful for me as a called Parent to Child1 to Child2 ( changed state value) update

thanks again bro

mayursoftwarewala
Автор

Thank you so much bro 😀, this makes it update immediately 😌

premraja
Автор

Hello i wanna ask I'm passing a state in a props and at initial render the data in state gets empty and after some time it comes

paranjaynajan
Автор

sir, this is not workig in nested if else condition please tell me what should I do in this case? I can't use 'useEffect' inside of a 'useEffect'! please try to replay me as soon as possible.
I am using three variables there.

foxgoody
Автор

Sir plz mujy onclick pr image change krni hai ..lkn aik image jo by default state mai set hain wo page refresh krne pr show hi nhi ho rhi

sheezanawaz
Автор

And here I'm very grateful to you!!
This will definitely solve my issue

rahulmohanty
Автор

Usestate, useeffect and useref... They all are used in functional components. But for the class component, we have setState, which also having the same problem. Can you please let me know the solution for class component ??

jugad_tech
Автор

Thank You So Much Brother For Sharing Your Valuable Knowledge! ❤It's Really Helpful...

taiseen-cse
Автор

But what if someone don't want to use useEffect hook ?

mohsinhussain
Автор

my state is updating on second click, its not updating on first click, please guide, i ma using redux toolkit
const MobileNumperEnter = () => {
const dispatch = useDispatch();
const phoneNumberHere = useSelector((state) => state.phoneNumber);


const onPressSendCode = () => {



console.log("phoneNumberHere", phoneNumberHere);
console.log("successValue",

// its not entering in if condition

if == 1) {
handleNavigate("OTPEnter", false, { deviceTypeParam: deviceType, contactNumberParam: inputContactState, deviceIdentifierParam: deviceIdentifier, deviceTokenParam: deviceToken });

console.log("add", 2 + 2);
setAlertValue(false);
}
else {
setAlertValue(true);
}
}
}

return(
<></>
)

umairali
Автор

what if i need to call an api with the text value on input box while onsubmit

samyamtimsina
Автор

hum useState me hi kuch changes nahi krr skte kya ???

gauravparasar
Автор

Mera ye to tha hi jisko maine is video ko dekhne se pahle hi solve kar doosra bhi tha

sid
Автор

Sometimes that make me irritating whenever i set value of then after that i want to use then .. that simple return null

amanrauniyar
Автор

Thank uhh sir for this video this help me lot 💜

amanrauniyar