You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which package manager are you using? (Yarn is recommended)
npm
Summary
I am unable to get drawer navigation to work with expo router.
The action 'REPLACE' with payload {"name":"dashboard"} was not handled by any navigator.
Do you have a screen named 'dashboard'?
This happens with the following strucutre
_layout.tsx
import{Drawer}from'expo-router/drawer'import{NavigationBar}from'./components'exportconstunstable_settings={// Ensure any route can link back to `/`initialRouteName: 'index',}exportdefaultfunctionLayout(){return(<DrawerscreenOptions={{header: NavigationBar,drawerStyle: {width: 240,},drawerType: 'permanent',}}/>)}
Okay i figured it out after reading this comment in another issue. It seems that push seems to be working but <Redirect /> uses replace internally and hence is not working. If I navigate directly to /dashboard (and not to the index file) using router.push it works. Gonna keep this issue open regardless because I think this is still something that should work.
I'm having this same issue. I have a stack inside a drawer and I want to default redirect my root drawer index route to the nested stack. I am returning a redirect and also tried router.redirect to the route and it doesn't actually change the route.
Which package manager are you using? (Yarn is recommended)
npm
Summary
I am unable to get drawer navigation to work with expo router.
This happens with the following strucutre
_layout.tsx
dashboard.tsx
index.tsx
Minimal reproducible example
See above
The text was updated successfully, but these errors were encountered: