DEV Community

Jack George
Jack George

Posted on

Navigation Stuck

I use Expo with file-based routing here is an example :
note: drawer, home and book are on the same level cause I wanna to not access the drawer from anywhere inside the home or book
(drawer) (have the drawer and drawer screens)
////_layout
////(tabs)
////////_layout (have the tabs and tabs screens)
////////home.tsx
////////book.tsx
home
////////_layout (have stack navigator for all inside home)
////////example1Folder
////////////index.tsx (the list)
////////////[id].tsx (the details)
////////example2Folder
////////////index.tsx (the list)
////////////[id].tsx (the details)
book
////_layout (have stack navigator for all inside home)
////example2Folder
//////////index.tsx (the list)
//////////[id].tsx (the details)
the problem as you see is that I have the example2Folder inside the home and book so my question is how to handle this case in a better way So example2Folder is shared between home and book and maybe others what should I do in that case
I need help on this thank all

Top comments (1)

Collapse
 
jack_george_08f843b25bb83 profile image
Jack George

or should I put the example2Folder at the root and make it a _layout with a stack inside switch between details and list?