Answer the question
In order to leave comments, you need to log in
How to make drawerNaviator in a specific screen?
Hello everyone, there are 3 screens: Login, Menu, Test. when you click on login, you need to go to the Menu, and there drawernavigation, I’ve been sitting for 2 hours, I can’t do it in any way, the transition by the button works, but drawernavigation is not in menu
router.js
import { createAppContainer, createSwitchNavigator, createDrawerNavigator, createStackNavigator} from 'react-navigation';
import { Login, Menu } from '../containers';
import {Text} from 'react-native'
import React, { Component } from 'react';
import Test from './Test'
const DrawerNavigator = createDrawerNavigator({
"Test": Test
})
export default createAppContainer(createSwitchNavigator({Login, Menu, DrawerNavigator}));
import { createAppContainer, createSwitchNavigator, createDrawerNavigator, createStackNavigator} from 'react-navigation';
import React, { Component } from 'react';
import {View, Text} from 'react-native'
import DrawerNavigator from '../config/router'
import Test from '../config/Test'
export default class Menu extends Component{
render(){
return(
<DrawerNavigator/>
);
}
}
import React from 'react';
import { Provider } from 'react-redux';
import store from './app/store';
import Navigation from './app/config/router';
export default App = () => (
<Provider store={store}>
<Navigation />
</Provider>
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question