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

Using use-context-selector in _app.tsx return undefined (Next.js) #59

Closed
vitorgouveia opened this issue Jan 4, 2022 · 1 comment
Closed

Comments

@vitorgouveia
Copy link

vitorgouveia commented Jan 4, 2022

So, I have been building an app with next.js and just ran into a minor problem

when calling either useContext or useContextSelector in _app.tsx the return is always undefined

"next": "latest"
"react": "^17.0.2",
"use-context-selector": "^1.3.9",
"scheduler": "^0.20.2",

is this expected behaviour?

@dai-shi
Copy link
Owner

dai-shi commented Jan 4, 2022

No... Is it nextjs specific? Can you make sure you have a Provider up in the tree?
You might want to provide a minimal reproduction.

@dai-shi dai-shi closed this as completed Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants