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
getDerivedStateFromProps is executed after setState #13015 #17701
Comments
What you should consider is how to return a partial state to merge. |
Without example code, I don't understand what you're saying or asking. It is expected that We did not previously call it again if If you want to share some code and ask a specific question about why the method is run, one of us could take a look. For now though I'll assume your question has been answered 😄 |
Thanks |
@bvaughn, Thanks for the answer |
Ideally getDerivedStateFromProps should not be called due to current component's setState. But it is behaving so. Can someone explain?
Couldn't find solution in #13015
The text was updated successfully, but these errors were encountered: