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

Hooks not working inside modal - Most likely breaks my Context.Provider #27

Open
mduecker opened this issue Sep 10, 2019 · 1 comment
Open
Labels
question Further information is requested

Comments

@mduecker
Copy link

mduecker commented Sep 10, 2019

I have my app wrapped with an Auth Context:
`<authContext.Provider> ... </authContext.Provider>``

And then within my LoginPage (written as functional component) I'm using a custom useAuth hook to acess the current auth object and use its functions (e.g. login, signup, ...):
const auth = useAuth();

Following this example:
https://usehooks.com/useAuth/

Problem:
When I open the page directly under its URL everything works. When opened in a modal the auth object returned by useAuth() is undefined.

@lsirivong
Copy link
Owner

Hi @mduecker sorry for the delay here. Is this still an issue for you? Could you share an example where this is reproduced?

I'll check if there's something obvious with hooks in general, but if you could share some code examples that would really help me track down your issue!

@lsirivong lsirivong added the question Further information is requested label Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants