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

CurrentUser Context #7

Open
NeilanshTriesToCode opened this issue May 20, 2023 · 2 comments
Open

CurrentUser Context #7

NeilanshTriesToCode opened this issue May 20, 2023 · 2 comments
Assignees
Labels
task #TODO

Comments

@NeilanshTriesToCode
Copy link
Owner

  • Create Context for CurrentUser.
  • The consuming Components, which are wrapped by its Provider should have access to the current user's info.
  • Would also be used to see if the current user's logged in/out, and render/redirect to Components accordingly.
@NeilanshTriesToCode
Copy link
Owner Author

  • Created file under context folder for CurrentUserContext.
  • For now, just for testing, the consuming Components which have access to the CurrentUserContext will have access to 2 variables defined in the context:
    • currentUser: Object w/ default key/values, for eg. {name: 'leomessi', email: '[email protected]'}
    • isLoading: to be used for any UI handling. Denotes whether the current user info has been loaded or not.

@NeilanshTriesToCode
Copy link
Owner Author

Testing pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task #TODO
Projects
None yet
Development

No branches or pull requests

1 participant