-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
State is undefined on child component callback #152
Comments
Hey, I am trying to reproduce with your example but I am not sure I am experiencing the bug. Would you mind sharing forking this blitz and sharing what you experience? |
Thanks for reply. UPD |
I see. this is really weird. I will have to debug this. Thanks for reporting. |
Is there any update on this? |
I slightly adjusted your code and it seems to work this way. Nothing was being re-rendered so the value was not changing. I added a useEffect that re-renders the App component when value changes |
yes, I also have this problem. |
yes, I also have this problem. |
Hey guys, sorry for taking so long with this. I believe that the latest version (3.2.3) should solve this issue. For anyone interested in the details: 2e19179 The picker had two bugs that caused this unexpected behavior.
These two seem to solve the issue, can anyone please post back to see if it works. |
I still face this issue on 4.5.1 |
Hey @paladin952 this is a closed and old issue. Can you please create a new issue with reproduction steps? |
Parent component:
So, problem is that State is undefined on child component callback.
Reproduction:
Press the button to set state.
Then press on any Emojy to execute callback from parent component and display state.
Callback will show undefined state, which you already set when you press the button.
How to get access to state?
The text was updated successfully, but these errors were encountered: