-
Notifications
You must be signed in to change notification settings - Fork 1
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
FIX(#330): Remove useCallback hook from auth context provider #405
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Gridiron Survivor Application
Project name: Gridiron Survivor Application
Only deployments on the production branch are activated automatically. If you'd like to activate this deployment, navigate to your deployments. Learn more about Appwrite Function deployments.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but do you have any screenshots of any of your tests so we can see what's happening after you removed useCallback()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ezpz LGTM
I do not have screenshots. What happens is the page still loads without issues :). Really it is a behinds the scene change. |
@@ -100,7 +100,7 @@ export const AuthContextProvider = ({ | |||
resetUser(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always, your beautiful pieces of code gone. :) I'd love to know how you found out useCallback
was causing more rendering. :)
fixes #330
Removed useCallback function from
AuthContextProvider.tsx
as it was not needed and it's dependencies causing more renders than needed.