-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
return null for conditional component after setting value and need to trigger twice in order to work #359
Comments
Thanks, this is definitely a bug. Looks like it's due to the combination of a few things:
In your case, this means that:
As to how to fix this: the root of the issue seems to be that the child Component mounted immediately after a state update doesn't read its initial state correctly. Fixing this issue at the source seems like a better option than forcing re-renders for every See PR #360 for a potential fix, I'll push a beta for you to try later today. |
🎉 This issue has been resolved in version 1.8.2-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks. It's now working on my end. |
🎉 This issue has been resolved in version 1.8.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Screen.Recording.2023-10-04.at.1.31.16.PM.mov
Here's the full code:
In this scenario, in the first click of the button, the
param
value isnull
unless you need to re-click again the button, that is the time thatparam
got a value.The text was updated successfully, but these errors were encountered: