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: Remove Login and Register Context #229

Open
rcamach7 opened this issue Jul 28, 2023 · 2 comments
Open

Refactor: Remove Login and Register Context #229

rcamach7 opened this issue Jul 28, 2023 · 2 comments
Labels
front-end front-end related issue good first issue Good for newcomers

Comments

@rcamach7
Copy link
Collaborator

rcamach7 commented Jul 28, 2023

Why?

  • 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)
@rcamach7 rcamach7 added help wanted Extra attention is needed good first issue Good for newcomers front-end front-end related issue labels Jul 28, 2023
@rcamach7 rcamach7 removed the help wanted Extra attention is needed label Jul 29, 2023
@lugenx lugenx added this to ecohabit Aug 7, 2023
@lugenx lugenx moved this to Todo in ecohabit Aug 7, 2023
@Saurabh-Rana17
Copy link

Saurabh-Rana17 commented Aug 19, 2024

hi @lugenx if this issue is still open can you please assign it to me

@sumitxae
Copy link

sumitxae commented Oct 8, 2024

I would like to handle this, could you assign this to me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end front-end related issue good first issue Good for newcomers
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants