-
Notifications
You must be signed in to change notification settings - Fork 304
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
Add useMemo() for value fetching hooks #41
Conversation
Very usefull pull request ! |
ping |
Could this PR be merged and a new release cut? I'm running into an issue that this PR solves. |
+1 |
ping++ |
Apologies that this has taken so long to be integrated into the library, but it's now landed as part of v2.2.0: https://github.com/CSFrequency/react-firebase-hooks/releases/tag/v2.2.0 Thank you @ypresto for the PR. |
This seems to work for |
I also faced the same issue with |
React.memo()
will work as expected with this!Without this, rerender (e.g. calling
setState()
ofuseState()
in the render function) will causeuseCollectionData()
anduseDocumentData()
(and realtime database counter parts) to return different reference (!==
) of data.