Replies: 4 comments 5 replies
-
you can look at the example for expo-router but i think what you would need is to add a root layout as a Stack that let you add Portal for modals. your
and then in your tab layout (if you want the button to be everywhere) can look into adding the Button with the onPress to navigate to the modal screen they aren't up to date to expo-router v2 but that will give you a good idea on how to organise your app for the different use cases. https://github.com/EvanBacon/expo-router-layouts-example/ but if you started a few days ago, it's going to take a little while to figure it all out :P |
Beta Was this translation helpful? Give feedback.
-
Hey, did you ever figure out how to do this? Edit: There's a |
Beta Was this translation helpful? Give feedback.
-
Anyone able to figure this out? |
Beta Was this translation helpful? Give feedback.
-
Adding a modal to a Stack screen and an open modal button to a Tab screen. Here’s the solution:
|
Beta Was this translation helpful? Give feedback.
-
Hi,
I am completely new to react native, just started learning a few days ago. I have a question regarding Tabs and modals.
On my bottom Tabs I have some tabs that navigate to home, profile. I want to have a third tab that is like an action button. Think of it like a button on twitter on instagram that creates a new post. On press of this button I want to trigger a modal/bottom sheet modal. Right now with the file structure, to display an item on a tab, it has to be within the file structure. And when I press the tab it navigates me to the Screen for that tab.
How can I disable this default behaviour and render a separate component ? Ideally on press a bottom sheet modal is displayed on top of whatever existing screen the user is on.
Beta Was this translation helpful? Give feedback.
All reactions