Last active
March 29, 2022 11:07
-
-
Save Yassir4/746fd6e032d0fa2da9459319bf16d521 to your computer and use it in GitHub Desktop.
Adding portalProvider and portal host to the root component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function App() { | |
return ( | |
<NavigationContainer> | |
<PortalProvider> | |
{/* view wrapper to fix the menu display in android */} | |
<View style={{flex: 1}}> | |
{/* our menu portal Host */} | |
<PortalHost name="menu" /> | |
<Stack.Navigator> | |
<Stack.Screen name="Home" component={HomeScreen} /> | |
</Stack.Navigator> | |
</View> | |
</PortalProvider> | |
</NavigationContainer> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment