Files
react-navigation/packages/compat
satyajit.happy 06cc8b9142 chore: publish
- @react-navigation/compat@5.0.0-alpha.3
 - @react-navigation/stack@5.0.0-alpha.18
2019-09-23 17:26:27 +02:00
..
2019-09-23 17:26:27 +02:00
2019-09-23 17:26:27 +02:00
2019-09-16 15:16:28 +02:00
2019-09-16 15:16:28 +02:00

@react-navigation/compat

Compatibility layer to write navigator definitions in static configuration format.

Installation

Open a Terminal in your project's folder and run,

yarn add @react-navigation/core @react-navigation/compat

Usage

import { createCompatNavigatorFactory } from '@react-navigation/compat';
import { createStackNavigator } from '@react-navigation/stack';

const RootStack = createCompatNavigatorFactory(createStackNavigator)(
  {
    Home: { screen: HomeScreen },
    Profile: { screen: ProfileScreen },
  },
  {
    initialRouteName: 'Profile',
  }
);