-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
usePathname() doesn't work with expo-router #445
Comments
Created two files
And it worked perfectly! |
Hm interesting. Well what you did is correct! |
@hamsterhomka
Trying to figure out a way to get the expected behaviour on native without the The comment can be edited though, it doesn't work with the expo router. @nandorojo Is there a relevant way to add a warning about this unexpected behaviour ? |
Yeah we probably need a config variable for expo router at the root |
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
usePathname()
returnsundefined
in expo application with expo-router.Expected Behavior
Work the same as in next.js
Steps To Reproduce
No response
Versions
Screenshots
I think that
usePathname
from 'solito/navigation' should useusePathname
from 'expo-router' under the hood instead ofuseContext(NavigationRouteContext)
Reproduction
No response
The text was updated successfully, but these errors were encountered: