React-native DrawerNavigator does not show upCustom navigation with Navigator component in React-NativeDisabling buttons on react nativeDrawerNavigator in React native not workingShow splash screen before show main screen in react native without using 3rd party libraryReact-Native DrawerNavigator Menu on both sidesRemove screen from drawerNavigatorhow to design drawernavigator aith reference appstacknavigatorDynamically changing drawer navigation layout react nativeHow to add an image to Header of Navigation Drawer in React Native?Drawers opens by default in react native
What are some countries where you can be imprisoned for reading or owning a Bible?
What do English-speaking kids call ice-cream on a stick?
My Friend James
Existence of a Hölder-free space
Friend is very nit picky about side comments I don't intend to be taken too seriously
How do I make my fill-in-the-blank exercise more obvious?
Remaining in the US beyond VWP admission period
Why did Boris Johnson call for new elections?
Draw the ☣ (Biohazard Symbol)
How quickly would a wooden treasure chest rot?
Was the lunar landing site always in the same plane as the CM's orbit?
Why does 8 bit truecolor use only 2 bits for blue?
Why there are construction cranes on apparently completed buildings in New York?
How could a planet have one hemisphere way warmer than the other without the planet being tidally locked?
Some questions about a series pass transistor & op amp voltage regulator
Is there some sort of French saying for "a person's signature move"?
Examples where "thin + thin = nice and thick"
Euro sign in table with siunitx
Is it right to use the ideas of non-winning designers in a design contest?
How to measure the statistical "distance" between two frequency distributions?
Why there is no wireless switch?
Why would image resources loaded from different origins triggering HTTP authentication dialogs be harmful?
What is the justification for Dirac's large numbers hypothesis?
Could this estimate of the size and mass of the Chicxulub Impactor be accurate?
React-native DrawerNavigator does not show up
Custom navigation with Navigator component in React-NativeDisabling buttons on react nativeDrawerNavigator in React native not workingShow splash screen before show main screen in react native without using 3rd party libraryReact-Native DrawerNavigator Menu on both sidesRemove screen from drawerNavigatorhow to design drawernavigator aith reference appstacknavigatorDynamically changing drawer navigation layout react nativeHow to add an image to Header of Navigation Drawer in React Native?Drawers opens by default in react native
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to create simple DrawerNavigator. But it does not show up :(
import React, Component from 'react';
import Text from 'react-native';
import createAppContainer, createDrawerNavigator from 'react-navigation';
class One extends Component
render()
return (<Text>One</Text>);
class Two extends Component
render()
return (<Text>Two</Text>);
const DrawerStack = createDrawerNavigator(
One: screen: One,
Two: screen: Two,
,
);
const App = createAppContainer(DrawerStack);
export default App;
This is what I see (no drawer navigation is displayed):
react-native expo
add a comment |
I am trying to create simple DrawerNavigator. But it does not show up :(
import React, Component from 'react';
import Text from 'react-native';
import createAppContainer, createDrawerNavigator from 'react-navigation';
class One extends Component
render()
return (<Text>One</Text>);
class Two extends Component
render()
return (<Text>Two</Text>);
const DrawerStack = createDrawerNavigator(
One: screen: One,
Two: screen: Two,
,
);
const App = createAppContainer(DrawerStack);
export default App;
This is what I see (no drawer navigation is displayed):
react-native expo
add a comment |
I am trying to create simple DrawerNavigator. But it does not show up :(
import React, Component from 'react';
import Text from 'react-native';
import createAppContainer, createDrawerNavigator from 'react-navigation';
class One extends Component
render()
return (<Text>One</Text>);
class Two extends Component
render()
return (<Text>Two</Text>);
const DrawerStack = createDrawerNavigator(
One: screen: One,
Two: screen: Two,
,
);
const App = createAppContainer(DrawerStack);
export default App;
This is what I see (no drawer navigation is displayed):
react-native expo
I am trying to create simple DrawerNavigator. But it does not show up :(
import React, Component from 'react';
import Text from 'react-native';
import createAppContainer, createDrawerNavigator from 'react-navigation';
class One extends Component
render()
return (<Text>One</Text>);
class Two extends Component
render()
return (<Text>Two</Text>);
const DrawerStack = createDrawerNavigator(
One: screen: One,
Two: screen: Two,
,
);
const App = createAppContainer(DrawerStack);
export default App;
This is what I see (no drawer navigation is displayed):
react-native expo
react-native expo
asked Mar 28 at 4:39
AlexAlex
416 bronze badges
416 bronze badges
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Swipe from the left and you will see the drawerNavigation works
the react-navigation createDrawerNavigator does not provide stack navigation by default, if you are looking to see a header with the menu icon, then you have to make your screens (one, two) be stackNavigation.
NB: import Icon from expo or react-native-icons
Updated:: using native-base
- install native-base ( ** npm install native-base --save** )
import Header, Icon, Container, Left, Content from native-base
class One extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen One</Text>
</Content>
</Container>
);
class Two extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen Two</Text>
</Content>
</Container>
);
const DrawerStack = createDrawerNavigator(
one:screen:One,
two: screen: Two
,
);
1. Swiping from the left does not work for me (Android). 2. It works, but only for screenOne. Do I need to add createStackNavigator for every screen as well (Two, Three, Four, ...) ? If there is a way to have this code added only once for all screens ?
– Alex
Mar 28 at 12:54
@Alex I have updated the code using native base and it much simpler. Try it out and let me know if that works for you.
– Hackman
Mar 28 at 15:32
add a comment |
Drawer Swipe Gesture is not working because in the new version of react navigation v3 npm. We need to install react-native-gesture-handler npm separately. They create separated npm package for touch & gesture handling and recognition.
Step 1.
npm i react-native-gesture-handler
Step 2.
react-native link react-native-gesture-handler
Step 3.(optional )
If step 2 is not worked properly, code is confogured properly
To finalize the installation of react-native-gesture-handler for Android, be sure to make the necessary modifications to MainActivity.java:
package com.reactnavigation.example;
import com.facebook.react.ReactActivity;
+ import com.facebook.react.ReactActivityDelegate;
+ import com.facebook.react.ReactRootView;
+ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity
@Override
protected String getMainComponentName()
return "Example";
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate()
+ return new ReactActivityDelegate(this, getMainComponentName())
+ @Override
+ protected ReactRootView createRootView()
+ return new RNGestureHandlerEnabledRootView(MainActivity.this);
+
+ ;
+
No additional steps are required for iOS.
Please Refer the following document for more information:-
https://reactnavigation.org/docs/en/getting-started.html#installation
https://www.npmjs.com/package/react-native-gesture-handler/v/1.0.0-alpha.34?activeTab=readme
https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html
Step 3 - this is what I needed. I already installed and linked react-native link, but Step 3 was missing in my case.
– Alex
Mar 28 at 15:35
Some time react-native link react-native-gesture-handler command is not worked properly that why we need to manually configure code if step 2 working properly there is no need of step 3
– Vishal Dhanotiya
Mar 28 at 16:02
add a comment |
It's good to take advantage of the native base.
The relevant link is here.
The navigation links are here.
You can also see the component here, so you can use the features you need.
Drawer navigation example.js:
import React, Component from "react";
import HomeScreen from "./HomeScreen.js";
import MainScreenNavigator from "../ChatScreen/index.js";
import Profile from "../ProfileScreen/index.js";
import SideBar from "../SideBar/SideBar.js";
import DrawerNavigator from "react-navigation";
const HomeScreenRouter = DrawerNavigator(
Home: screen: HomeScreen ,
Chat: screen: MainScreenNavigator ,
Profile: screen: Profile
,
contentComponent: props => <SideBar ...props />
);
export default HomeScreenRouter;
Easy to operate without special implementation.
If you have any further comments, please leave a comment.
And if my answer is good, please make a choice.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55390274%2freact-native-drawernavigator-does-not-show-up%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Swipe from the left and you will see the drawerNavigation works
the react-navigation createDrawerNavigator does not provide stack navigation by default, if you are looking to see a header with the menu icon, then you have to make your screens (one, two) be stackNavigation.
NB: import Icon from expo or react-native-icons
Updated:: using native-base
- install native-base ( ** npm install native-base --save** )
import Header, Icon, Container, Left, Content from native-base
class One extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen One</Text>
</Content>
</Container>
);
class Two extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen Two</Text>
</Content>
</Container>
);
const DrawerStack = createDrawerNavigator(
one:screen:One,
two: screen: Two
,
);
1. Swiping from the left does not work for me (Android). 2. It works, but only for screenOne. Do I need to add createStackNavigator for every screen as well (Two, Three, Four, ...) ? If there is a way to have this code added only once for all screens ?
– Alex
Mar 28 at 12:54
@Alex I have updated the code using native base and it much simpler. Try it out and let me know if that works for you.
– Hackman
Mar 28 at 15:32
add a comment |
Swipe from the left and you will see the drawerNavigation works
the react-navigation createDrawerNavigator does not provide stack navigation by default, if you are looking to see a header with the menu icon, then you have to make your screens (one, two) be stackNavigation.
NB: import Icon from expo or react-native-icons
Updated:: using native-base
- install native-base ( ** npm install native-base --save** )
import Header, Icon, Container, Left, Content from native-base
class One extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen One</Text>
</Content>
</Container>
);
class Two extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen Two</Text>
</Content>
</Container>
);
const DrawerStack = createDrawerNavigator(
one:screen:One,
two: screen: Two
,
);
1. Swiping from the left does not work for me (Android). 2. It works, but only for screenOne. Do I need to add createStackNavigator for every screen as well (Two, Three, Four, ...) ? If there is a way to have this code added only once for all screens ?
– Alex
Mar 28 at 12:54
@Alex I have updated the code using native base and it much simpler. Try it out and let me know if that works for you.
– Hackman
Mar 28 at 15:32
add a comment |
Swipe from the left and you will see the drawerNavigation works
the react-navigation createDrawerNavigator does not provide stack navigation by default, if you are looking to see a header with the menu icon, then you have to make your screens (one, two) be stackNavigation.
NB: import Icon from expo or react-native-icons
Updated:: using native-base
- install native-base ( ** npm install native-base --save** )
import Header, Icon, Container, Left, Content from native-base
class One extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen One</Text>
</Content>
</Container>
);
class Two extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen Two</Text>
</Content>
</Container>
);
const DrawerStack = createDrawerNavigator(
one:screen:One,
two: screen: Two
,
);
Swipe from the left and you will see the drawerNavigation works
the react-navigation createDrawerNavigator does not provide stack navigation by default, if you are looking to see a header with the menu icon, then you have to make your screens (one, two) be stackNavigation.
NB: import Icon from expo or react-native-icons
Updated:: using native-base
- install native-base ( ** npm install native-base --save** )
import Header, Icon, Container, Left, Content from native-base
class One extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen One</Text>
</Content>
</Container>
);
class Two extends Component
render()
return (
<Container>
<Header>
<Left>
<Icon name="md-menu" onPress=() => this.props.navigation.openDrawer() />
</Left>
</Header>
<Content>
<Text>Screen Two</Text>
</Content>
</Container>
);
const DrawerStack = createDrawerNavigator(
one:screen:One,
two: screen: Two
,
);
edited Mar 28 at 15:38
answered Mar 28 at 12:16
HackmanHackman
6666 silver badges12 bronze badges
6666 silver badges12 bronze badges
1. Swiping from the left does not work for me (Android). 2. It works, but only for screenOne. Do I need to add createStackNavigator for every screen as well (Two, Three, Four, ...) ? If there is a way to have this code added only once for all screens ?
– Alex
Mar 28 at 12:54
@Alex I have updated the code using native base and it much simpler. Try it out and let me know if that works for you.
– Hackman
Mar 28 at 15:32
add a comment |
1. Swiping from the left does not work for me (Android). 2. It works, but only for screenOne. Do I need to add createStackNavigator for every screen as well (Two, Three, Four, ...) ? If there is a way to have this code added only once for all screens ?
– Alex
Mar 28 at 12:54
@Alex I have updated the code using native base and it much simpler. Try it out and let me know if that works for you.
– Hackman
Mar 28 at 15:32
1. Swiping from the left does not work for me (Android). 2. It works, but only for screenOne. Do I need to add createStackNavigator for every screen as well (Two, Three, Four, ...) ? If there is a way to have this code added only once for all screens ?
– Alex
Mar 28 at 12:54
1. Swiping from the left does not work for me (Android). 2. It works, but only for screenOne. Do I need to add createStackNavigator for every screen as well (Two, Three, Four, ...) ? If there is a way to have this code added only once for all screens ?
– Alex
Mar 28 at 12:54
@Alex I have updated the code using native base and it much simpler. Try it out and let me know if that works for you.
– Hackman
Mar 28 at 15:32
@Alex I have updated the code using native base and it much simpler. Try it out and let me know if that works for you.
– Hackman
Mar 28 at 15:32
add a comment |
Drawer Swipe Gesture is not working because in the new version of react navigation v3 npm. We need to install react-native-gesture-handler npm separately. They create separated npm package for touch & gesture handling and recognition.
Step 1.
npm i react-native-gesture-handler
Step 2.
react-native link react-native-gesture-handler
Step 3.(optional )
If step 2 is not worked properly, code is confogured properly
To finalize the installation of react-native-gesture-handler for Android, be sure to make the necessary modifications to MainActivity.java:
package com.reactnavigation.example;
import com.facebook.react.ReactActivity;
+ import com.facebook.react.ReactActivityDelegate;
+ import com.facebook.react.ReactRootView;
+ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity
@Override
protected String getMainComponentName()
return "Example";
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate()
+ return new ReactActivityDelegate(this, getMainComponentName())
+ @Override
+ protected ReactRootView createRootView()
+ return new RNGestureHandlerEnabledRootView(MainActivity.this);
+
+ ;
+
No additional steps are required for iOS.
Please Refer the following document for more information:-
https://reactnavigation.org/docs/en/getting-started.html#installation
https://www.npmjs.com/package/react-native-gesture-handler/v/1.0.0-alpha.34?activeTab=readme
https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html
Step 3 - this is what I needed. I already installed and linked react-native link, but Step 3 was missing in my case.
– Alex
Mar 28 at 15:35
Some time react-native link react-native-gesture-handler command is not worked properly that why we need to manually configure code if step 2 working properly there is no need of step 3
– Vishal Dhanotiya
Mar 28 at 16:02
add a comment |
Drawer Swipe Gesture is not working because in the new version of react navigation v3 npm. We need to install react-native-gesture-handler npm separately. They create separated npm package for touch & gesture handling and recognition.
Step 1.
npm i react-native-gesture-handler
Step 2.
react-native link react-native-gesture-handler
Step 3.(optional )
If step 2 is not worked properly, code is confogured properly
To finalize the installation of react-native-gesture-handler for Android, be sure to make the necessary modifications to MainActivity.java:
package com.reactnavigation.example;
import com.facebook.react.ReactActivity;
+ import com.facebook.react.ReactActivityDelegate;
+ import com.facebook.react.ReactRootView;
+ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity
@Override
protected String getMainComponentName()
return "Example";
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate()
+ return new ReactActivityDelegate(this, getMainComponentName())
+ @Override
+ protected ReactRootView createRootView()
+ return new RNGestureHandlerEnabledRootView(MainActivity.this);
+
+ ;
+
No additional steps are required for iOS.
Please Refer the following document for more information:-
https://reactnavigation.org/docs/en/getting-started.html#installation
https://www.npmjs.com/package/react-native-gesture-handler/v/1.0.0-alpha.34?activeTab=readme
https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html
Step 3 - this is what I needed. I already installed and linked react-native link, but Step 3 was missing in my case.
– Alex
Mar 28 at 15:35
Some time react-native link react-native-gesture-handler command is not worked properly that why we need to manually configure code if step 2 working properly there is no need of step 3
– Vishal Dhanotiya
Mar 28 at 16:02
add a comment |
Drawer Swipe Gesture is not working because in the new version of react navigation v3 npm. We need to install react-native-gesture-handler npm separately. They create separated npm package for touch & gesture handling and recognition.
Step 1.
npm i react-native-gesture-handler
Step 2.
react-native link react-native-gesture-handler
Step 3.(optional )
If step 2 is not worked properly, code is confogured properly
To finalize the installation of react-native-gesture-handler for Android, be sure to make the necessary modifications to MainActivity.java:
package com.reactnavigation.example;
import com.facebook.react.ReactActivity;
+ import com.facebook.react.ReactActivityDelegate;
+ import com.facebook.react.ReactRootView;
+ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity
@Override
protected String getMainComponentName()
return "Example";
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate()
+ return new ReactActivityDelegate(this, getMainComponentName())
+ @Override
+ protected ReactRootView createRootView()
+ return new RNGestureHandlerEnabledRootView(MainActivity.this);
+
+ ;
+
No additional steps are required for iOS.
Please Refer the following document for more information:-
https://reactnavigation.org/docs/en/getting-started.html#installation
https://www.npmjs.com/package/react-native-gesture-handler/v/1.0.0-alpha.34?activeTab=readme
https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html
Drawer Swipe Gesture is not working because in the new version of react navigation v3 npm. We need to install react-native-gesture-handler npm separately. They create separated npm package for touch & gesture handling and recognition.
Step 1.
npm i react-native-gesture-handler
Step 2.
react-native link react-native-gesture-handler
Step 3.(optional )
If step 2 is not worked properly, code is confogured properly
To finalize the installation of react-native-gesture-handler for Android, be sure to make the necessary modifications to MainActivity.java:
package com.reactnavigation.example;
import com.facebook.react.ReactActivity;
+ import com.facebook.react.ReactActivityDelegate;
+ import com.facebook.react.ReactRootView;
+ import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
public class MainActivity extends ReactActivity
@Override
protected String getMainComponentName()
return "Example";
+ @Override
+ protected ReactActivityDelegate createReactActivityDelegate()
+ return new ReactActivityDelegate(this, getMainComponentName())
+ @Override
+ protected ReactRootView createRootView()
+ return new RNGestureHandlerEnabledRootView(MainActivity.this);
+
+ ;
+
No additional steps are required for iOS.
Please Refer the following document for more information:-
https://reactnavigation.org/docs/en/getting-started.html#installation
https://www.npmjs.com/package/react-native-gesture-handler/v/1.0.0-alpha.34?activeTab=readme
https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html
edited Mar 28 at 16:04
answered Mar 28 at 14:02
Vishal DhanotiyaVishal Dhanotiya
6423 silver badges15 bronze badges
6423 silver badges15 bronze badges
Step 3 - this is what I needed. I already installed and linked react-native link, but Step 3 was missing in my case.
– Alex
Mar 28 at 15:35
Some time react-native link react-native-gesture-handler command is not worked properly that why we need to manually configure code if step 2 working properly there is no need of step 3
– Vishal Dhanotiya
Mar 28 at 16:02
add a comment |
Step 3 - this is what I needed. I already installed and linked react-native link, but Step 3 was missing in my case.
– Alex
Mar 28 at 15:35
Some time react-native link react-native-gesture-handler command is not worked properly that why we need to manually configure code if step 2 working properly there is no need of step 3
– Vishal Dhanotiya
Mar 28 at 16:02
Step 3 - this is what I needed. I already installed and linked react-native link, but Step 3 was missing in my case.
– Alex
Mar 28 at 15:35
Step 3 - this is what I needed. I already installed and linked react-native link, but Step 3 was missing in my case.
– Alex
Mar 28 at 15:35
Some time react-native link react-native-gesture-handler command is not worked properly that why we need to manually configure code if step 2 working properly there is no need of step 3
– Vishal Dhanotiya
Mar 28 at 16:02
Some time react-native link react-native-gesture-handler command is not worked properly that why we need to manually configure code if step 2 working properly there is no need of step 3
– Vishal Dhanotiya
Mar 28 at 16:02
add a comment |
It's good to take advantage of the native base.
The relevant link is here.
The navigation links are here.
You can also see the component here, so you can use the features you need.
Drawer navigation example.js:
import React, Component from "react";
import HomeScreen from "./HomeScreen.js";
import MainScreenNavigator from "../ChatScreen/index.js";
import Profile from "../ProfileScreen/index.js";
import SideBar from "../SideBar/SideBar.js";
import DrawerNavigator from "react-navigation";
const HomeScreenRouter = DrawerNavigator(
Home: screen: HomeScreen ,
Chat: screen: MainScreenNavigator ,
Profile: screen: Profile
,
contentComponent: props => <SideBar ...props />
);
export default HomeScreenRouter;
Easy to operate without special implementation.
If you have any further comments, please leave a comment.
And if my answer is good, please make a choice.
add a comment |
It's good to take advantage of the native base.
The relevant link is here.
The navigation links are here.
You can also see the component here, so you can use the features you need.
Drawer navigation example.js:
import React, Component from "react";
import HomeScreen from "./HomeScreen.js";
import MainScreenNavigator from "../ChatScreen/index.js";
import Profile from "../ProfileScreen/index.js";
import SideBar from "../SideBar/SideBar.js";
import DrawerNavigator from "react-navigation";
const HomeScreenRouter = DrawerNavigator(
Home: screen: HomeScreen ,
Chat: screen: MainScreenNavigator ,
Profile: screen: Profile
,
contentComponent: props => <SideBar ...props />
);
export default HomeScreenRouter;
Easy to operate without special implementation.
If you have any further comments, please leave a comment.
And if my answer is good, please make a choice.
add a comment |
It's good to take advantage of the native base.
The relevant link is here.
The navigation links are here.
You can also see the component here, so you can use the features you need.
Drawer navigation example.js:
import React, Component from "react";
import HomeScreen from "./HomeScreen.js";
import MainScreenNavigator from "../ChatScreen/index.js";
import Profile from "../ProfileScreen/index.js";
import SideBar from "../SideBar/SideBar.js";
import DrawerNavigator from "react-navigation";
const HomeScreenRouter = DrawerNavigator(
Home: screen: HomeScreen ,
Chat: screen: MainScreenNavigator ,
Profile: screen: Profile
,
contentComponent: props => <SideBar ...props />
);
export default HomeScreenRouter;
Easy to operate without special implementation.
If you have any further comments, please leave a comment.
And if my answer is good, please make a choice.
It's good to take advantage of the native base.
The relevant link is here.
The navigation links are here.
You can also see the component here, so you can use the features you need.
Drawer navigation example.js:
import React, Component from "react";
import HomeScreen from "./HomeScreen.js";
import MainScreenNavigator from "../ChatScreen/index.js";
import Profile from "../ProfileScreen/index.js";
import SideBar from "../SideBar/SideBar.js";
import DrawerNavigator from "react-navigation";
const HomeScreenRouter = DrawerNavigator(
Home: screen: HomeScreen ,
Chat: screen: MainScreenNavigator ,
Profile: screen: Profile
,
contentComponent: props => <SideBar ...props />
);
export default HomeScreenRouter;
Easy to operate without special implementation.
If you have any further comments, please leave a comment.
And if my answer is good, please make a choice.
edited Mar 28 at 14:29
answered Mar 28 at 13:45
hong develophong develop
4,3861 gold badge4 silver badges26 bronze badges
4,3861 gold badge4 silver badges26 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55390274%2freact-native-drawernavigator-does-not-show-up%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown