Go to file
Volodymyr Kozieiev 04ed5fddfb
version bumped to 0.0.2
2019-06-26 11:52:59 +03:00
README.md Added link to video in Readme.md 2019-06-20 11:03:20 +03:00
index.js First opened screen doesn't substitute default one 2019-06-26 11:47:59 +03:00
package-lock.json version bumped to 0.0.2 2019-06-26 11:52:59 +03:00
package.json version bumped to 0.0.2 2019-06-26 11:52:59 +03:00

README.md

react-native-navigation-twopane

Custom two-pane navigator for React Navigation. Implements master/detail pattern. Built on top of Stack navigator.

Usage

The only difference from Stack navigator is that in routes config additional field emptyRightPaneName should be set.

import {
    createAppContainer,
    createBottomTabNavigator,
} from 'react-navigation'; 
import {createTwoPaneNavigator} from "react-native-navigation-twopane";


const routes = {
    Item: {
        screen: ItemScreen,
    },
    List: {
        screen: ListScreen,
    },
    Details: {
        screen: DetailsScreen,
    },
    NoChats: {
        screen: NoChatsScreen,
    },
};


const routesConfig = {
    initialRouteName: 'List',
    emptyRightPaneName: 'NoChats'
};

const MasterDetailNavigator = createTwoPaneNavigator(routes, routesConfig);

const AppContainer = createAppContainer(MasterDetailNavigator);

export default class App extends React.Component {
    render() {
        return <AppContainer/>
    }
}

https://www.youtube.com/watch?v=yZXXffDF-_8