I have an app with 4 Tabs I want to be able to present a Modal screen on any of the Tab Items. I’m trying to get my head around expo-router, however, It’s not going through.
My file structure is:
app
(auth)
_layout.js
Onboard.js
SignIn.js
ForgotPassword.js
(tabs)
_layout.js
Home1.js
Home2.js
Home3.js
Home4.js
_layout.js
index.js
Do I need a new group with:
_layout.js
Modal.js
and does this go under my (tabs) folder of the app?
Any help greatly appreciated.
2
Answers
You can do this by adding Modal screen what ever tab you want. like use stack-navigation inside tabs.
Add your-modal.js to your (tabs) folder. Then in (tabs)/_layout.js add a Tab-screen with name=’your-modal’ and options={{href:null}}.