You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are defined as context at the top level of the app that will:
cause re renders anytime a form input changes when user is logging in / registering
cause performance issues due to large amounts of input changes that cause re renders
Encapsulate the sign in and sign up functionality into their respective form components
How?
Login and Register components should track their own input via states defined in that same component
create handler functions that update this state when input changes
on submission, make sure that these new states and their values are being used instead of the old context
remove all imports and lines related to old files
Delete LoginContext and RegisterContext files
Delete all imports from these files wherever they exist
Delete these contexts from App.js file
Update ResponsiveAppBar component
Right now it uses the isLoggedIn value from the LoginContext. Use UserContext instead and check for the truthly value of user to check if user is logged in / exists.
Search for additional usages of these contexts and make appropriate updates (feel free to ask questions)
The text was updated successfully, but these errors were encountered:
Why?
How?
App.js
fileResponsiveAppBar
componentisLoggedIn
value from the LoginContext. Use UserContext instead and check for the truthly value ofuser
to check if user is logged in / exists.The text was updated successfully, but these errors were encountered: