You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am updating the global state using context api, but when I am calling global state in useEffect() it still retreive the initial value, not updated value. here I used [], as second parameter for useEffect function. when I remove it, it execute all code withing useEffect function as unlimited.
Hi @swathisaathvi! This issue needs more information before we'll be able to provide any help. I'm going to close it for now since it seems like it was just copy-pasted from another user's (@muhammadwfa) comment.
If you provide some more context (some example code that shows what you're doing and what's happening that's unexpected) I'll re-open it!
almost same problem.
I am updating the global state using context api, but when I am calling global state in
useEffect()
it still retreive the initial value, not updated value. here I used [], as second parameter for useEffect function. when I remove it, it execute all code withing useEffect function as unlimited.Originally posted by @muhammadwfa in #14066 (comment)
The text was updated successfully, but these errors were encountered: