Skip to content

Handling stale props? #4

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

Closed
dai-shi opened this issue Mar 2, 2019 · 1 comment · Fixed by #5
Closed

Handling stale props? #4

dai-shi opened this issue Mar 2, 2019 · 1 comment · Fixed by #5

Comments

@dai-shi
Copy link
Owner

dai-shi commented Mar 2, 2019

facebookarchive/redux-react-hook#39 (comment)

After reading this thread, I'm afraid this library is not handling the stale props, yet.
As far as I understand, the problem is that the props in the render phase is not sync with the previous props in the commit phase which are likely to exist in closures created in useEffect.

I wonder, it can be simply solved by calling a callback in each commit phase, or not?

@dai-shi
Copy link
Owner Author

dai-shi commented Mar 3, 2019

I'd really appreciate if someone could review the code.

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

Successfully merging a pull request may close this issue.

1 participant