aksonov / aksonov/react-native-router-flux
Not able to create two child scenes inside Drawer
- 主要言語
- JavaScript
- スター
- 8.9k
- フォーク
- 2.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Version
Tell us which versions you are using:
- react-native-router-flux v4.2.0
- react v16.3.1
- react-native v0.63.3
### Expected behaviour
I should be able to switch between multiple screens inside a drawer, but I am not able to do so.
### Actual behaviour
It does only show one scene inside the drawer and It is neither able to navigate between the scenes inside the drawer nor able to switch between the screens through the drawer menu.
### Steps to reproduce
For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
1. I used the Example react-native project and modified it a bit.
2. Attached is the app.js code that I modified.
```
import React from 'react';
import {Platform, StyleSheet, Text} from 'react-native';
import {StackViewStyleInterpolator} from 'react-navigation-stack';
import {
Scene,
Router,
Actions,
ActionConst,
Overlay,
Tabs,
Modal,
Drawer,
Stack,
Lightbox,
} from 'react-native-router-flux';
import Launch from './components/Launch';
import Register from './components/Register';
import Login from './components/Login';
import Login2 from './components/Login2';
import Login3 from './components/Login3';
import Home from './components/Home';
import DrawerContent from './components/drawer/DrawerContent';
import TabView from './components/TabView';
import TabIcon from './components/TabIcon';
import EchoView from './components/EchoView';
import MessageBar from './components/MessageBar';
import ErrorModal from './components/modal/ErrorModal';
import IssueModal from './components/modal/IssueModal';
import DemoLightbox from './components/lightbox/DemoLightbox';
import MenuIcon from './images/menu_burger.png';
import CustomNavBarView from './components/CustomNavBarView';
import CustomNavBar from './components/CustomNavBar';
import CustomNavBar2 from './components/CustomNavBar2';
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'transparent',
justifyContent: 'center',
alignItems: 'center',
},
scene: {
backgroundColor: '#F5FCFF',
shadowOpacity: 1,
shadowRadius: 3,
},
tabBarStyle: {
backgroundColor: '#fff',
},
tabBarSelectedItemStyle: {
backgroundColor: '#ddd',
},
});
const stateHandler = (prevState, newState, action) => {
console.log('onStateChange: ACTION:', action);
};
// on Android, the URI prefix typically contains a host in addition to scheme
const prefix = Platform.OS === 'android' ? 'mychat://mychat/' : 'mychat://';
const transitionConfig = () => ({
screenInterpolator: StackViewStyleInterpolator.forFadeFromBottomAndroid,
});
const Example = () => (
navigation.state.key}
/>
{
console.log('Drawer closed');
}}
onEnter={() => {
console.log('Drawer opened');
}}
contentComponent={DrawerContent}
drawerImage={MenuIcon}
drawerWidth={300}>
{/*
Wrapper Scene needed to fix a bug where the tabs would
reload as a modal ontop of itself
*/}
{
console.log('Back to initial and also print this');
}}
showLabel={false}
activeTintColor="blue"
inactiveTintColor="grey"
tabBarStyle={styles.tabBarStyle}
activeBackgroundColor="white"
inactiveBackgroundColor="rgba(255, 255, 255, 0)">
);
export default Example;
```
コントリビューションガイド
評価
この issue はまだ評価されていません。