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

refactor: define _getSession in useEffect scope #724

Merged
merged 4 commits into from
Dec 5, 2020

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Sep 30, 2020

A common mistake to define functions outside of the useEffect even though they will exclusively be used inside of it. This way, the function will not be recreated every time _useSessionHook is called.

@vercel vercel bot temporarily deployed to Preview September 30, 2020 12:15 Inactive
@vercel
Copy link

vercel bot commented Sep 30, 2020

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/nextauthjs/next-auth/33domlumq
✅ Preview: https://next-auth-git-patch-1.nextauthjs.vercel.app

@vercel vercel bot temporarily deployed to Preview October 15, 2020 09:08 Inactive
@vercel vercel bot temporarily deployed to Preview November 20, 2020 22:59 Inactive
@vercel vercel bot temporarily deployed to Preview November 20, 2020 23:33 Inactive
@balazsorban44 balazsorban44 changed the title define _getSession in useEffect scope refactor: define _getSession in useEffect scope Dec 5, 2020
@balazsorban44 balazsorban44 merged commit 5f5174f into nextauthjs:main Dec 5, 2020
@balazsorban44 balazsorban44 deleted the patch-1 branch December 5, 2020 09:00
@github-actions
Copy link

github-actions bot commented Feb 1, 2021

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

1 participant