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

Use callback to make sure dispatch function is stable #52

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

MargaretKrutikova
Copy link
Collaborator

Fixed #51 by using useCallback around dispatch with store as dependency.

@MargaretKrutikova MargaretKrutikova merged commit 82f5e8e into master Oct 15, 2019
@MargaretKrutikova MargaretKrutikova deleted the memoize-dispatch branch October 15, 2019 19:44
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 this pull request may close these issues.

Using dispatch as custom hook dependency re-renders hook repeatedly
1 participant