score:2
Accepted answer
Solution
You need to put your MyProfileStack
in DrawerStack
as below.
const DrawerStack = createDrawerNavigator({
MyProfile: { screen: MyProfileStack }
Edit: { screen: EditProfileStack }
Settings: { screen: SettingsStack }
})
const TabStack = createBottomTabNavigator({
Feed: { screen: FeedStack },
Profile: { screen: DrawerStack },
});
const AppContainer = createAppContainer(MainStack);
You can use various combination.
Why?
SwitchNavigator resign other Screens when you switch to another one. So you cannot call drawer from the screen already resigned.
p.s: You can use navigation events if you want to refresh your screen when change the screen. Use onWillFocus
.
Source: stackoverflow.com
Related Query
- React navigation - how to nest drawerNavigator inside stackNavigator
- How to pass props to component inside a React Navigation navigator?
- How to put a React Component Inside a nest of StyledComponents
- How to use switch statement inside a React component?
- How to update React Context from inside a child component?
- How to loop over a number in React inside JSX
- React Navigation switching background colors and styling StackNavigator
- How to nest routes in React Router v4?
- How to close a React Navigation modal with multiple screens in it
- How to mock a custom hook inside of a React component you want to test?
- How to Embed StencilJS components inside Storybook React App?
- React Formik Material UI Autocomplete: How can I populate value inside of autocomplete from localStorage?
- how to load React app / Lib inside ExtJs Component
- How to manage title, meta tags, etc, inside React with server rendering + streaming?
- How to use material-ui IconMenu inside cell of React fixed-data-table
- How to refresh in React Navigation
- How to integrate a React webapp inside a spring boot Application with jar packaging
- React Navigation: How to update navigation title for parent, when value comes from redux and gets updated in child?
- how to use a CDN inside a React component
- How to hide bottom navigation bar on a specific screen in react native?
- Hide header on StackNavigator with React Navigation in React Native
- How to use FormattedMessage inside an option tag in React 0.14?
- React Router DOM — How to include a navigation bar on every page?
- How to use Media Queries inside a React Styled Components Keyframe?
- How do I target DOM elements inside a react component, or should I avoid targeting DOM elements all together?
- React Native - LayoutAnimation: how to make it just animate object inside component, not whole component/view?
- How to create a custom top navigation bar in React Native
- React Navigation 2: How to check previous scene and to disable tab change
- React Navigation 5 - How to navigate from headerRight?
- How do I pass a Prop to a Navigation Screen Component - React Native
More Query from same tag
- Why isn't the user I clicked deleted?
- React and Vue Google map API remove rendered direction before setting a new one on the map
- Warning: You provided a `checked` prop to a form field without an `onChange` handler
- Is there a way to send props and function in one onClick event?
- Getting current value of variable outside the useEffect in React
- Add HTML tags dynamically using JSX
- Spread properties in Redux
- How to I dispatch a state value to an const variable in Redux-toolkit?
- React Typescript: Why is my canvas image resize component creating small blurry images from large crisp images?
- How to embed :id parameter in the middle of a URL in react router
- Fetch global data for the whole app in Next.js on initial page load
- Ionic React - Binding element 'selected' implicitly has an 'any' type.ts(7031)
- drawing 4 circles in a canvas in reactjs
- Deactivate drag and drop for table in react
- React: Load objects with a REST call and prepend new from WebSocket events
- Having trouble importing CSS in NextJs
- Binding moved.zf.slider (Zurb Foundation) to React function
- Ionic React Page Transition
- Component is not showing
- Can't map array data in react js to child component
- Passing array from useState as prop
- HoC with React Hooks
- State array updating on next click
- How do I position my React hamburger menu flush at the upper right of my site?
- How to make an icon clickable so it renders data below
- i18next backendConnector: loading namespace translations for language fr failed
- How to understand complicated typescript generic types?
- How to use document.getElementById() with styled components in react?
- How to Draw Polyline on mapmyindia using React?
- Material Ui TextField remove bottom border