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

docs(hooks.md): clarify useDispatch, see #1468 #1598

Merged
merged 2 commits into from
Jun 30, 2020
Merged

docs(hooks.md): clarify useDispatch, see #1468 #1598

merged 2 commits into from
Jun 30, 2020

Conversation

papb
Copy link
Contributor

@papb papb commented Jun 30, 2020

This PR clarifies the memoization of useDispatch and how the generated dispatch function can be safely used as a dependency of an useCallback hook.

I wrote this thinking of what I would have liked to read earlier today. This little clarification would have saved some time.

Thanks for considering!


This would resolve #1468 (in my opinion) if it wasn't already closed.

@netlify
Copy link

netlify bot commented Jun 30, 2020

Deploy preview for react-redux-docs ready!

Built with commit 7c90bbe

https://deploy-preview-1598--react-redux-docs.netlify.app

@timdorr
Copy link
Member

timdorr commented Jun 30, 2020

Thanks!

@timdorr timdorr merged commit 3da5995 into reduxjs:master Jun 30, 2020
@markerikson
Copy link
Contributor

Unfortunately, I think this might have the same problem we've been running into with the versioning: it only updates the file under /docs, and not in the versioned folders, so it'll only show up under the "Next" version instead of the main page.

@papb
Copy link
Contributor Author

papb commented Jun 30, 2020

@markerikson Hmm, should I create mirror PRs targeting other branches? Which ones?

@markerikson
Copy link
Contributor

It's not "other branches" - it's the files under https://github.com/reduxjs/react-redux/tree/master/website/versioned_docs .

albertodev7 pushed a commit to albertodev7/react-redux that referenced this pull request Dec 8, 2022
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.

Memoize useDispatch?
3 participants