Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

almost same problem. #17049

Closed
swathisaathvi opened this issue Oct 9, 2019 · 2 comments
Closed

almost same problem. #17049

swathisaathvi opened this issue Oct 9, 2019 · 2 comments

Comments

@swathisaathvi
Copy link

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)

@kunukn
Copy link
Contributor

kunukn commented Oct 9, 2019

Can you create a minimal, reproducible example? It could be in codesandbox or github repo.

Can you please update the title to something more meaningful than "almost same problem"?

@bvaughn
Copy link
Contributor

bvaughn commented Oct 9, 2019

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants