Skip to content

Conversation

@AjaxSolutions
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Jan 13, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tannerlinsley/react-query/g767tvb85
✅ Preview: https://react-query-git-fork-ajaxsolutions-hydrate-typo.tannerlinsley.vercel.app

@AjaxSolutions
Copy link
Contributor Author

See discussion.

@AjaxSolutions AjaxSolutions changed the title fix typo: useMemo -> useEffect Fix typo: useMemo -> useEffect Jan 13, 2021
@tannerlinsley
Copy link
Collaborator

My intuition is that this might have adverse effects on things that we possibly have not tested yet, but I'm going to trust the tests here and merge. Be prepared for a possible issue to arise and for this PR to be rolled back.... or it will go unnoticed forever because everything is fine 😉 We'll see! 🥂

@tannerlinsley tannerlinsley merged commit 5f04615 into TanStack:master Jan 15, 2021
@tannerlinsley
Copy link
Collaborator

🎉 This PR is included in version 3.5.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lynxtaa
Copy link

lynxtaa commented Jan 17, 2021

I think this PR should be reverted: it breaks SSR in Next.js. See #1661

@AjaxSolutions
Copy link
Contributor Author

AjaxSolutions commented Jan 17, 2021

I think this PR should be reverted: it breaks SSR in Next.js. See #1661

You might be right and thanks for checking. My intent was to point out that the useMemo hook is misused when it runs a side effect.

useMemo should be used to memoize the return value of a function, which is not what this hook is doing.

Also, see how the Apollo Client uses the ssr option.

ssr - boolean - Pass in false to skip your query during server-side rendering.

SSR

@tannerlinsley
Copy link
Collaborator

Reverted with eb3d700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants