feat: compatibility layer

This commit is contained in:
satyajit.happy
2019-09-13 10:25:37 +02:00
committed by Satyajit Sahoo
parent 438692d661
commit e0f28a432d
21 changed files with 905 additions and 12 deletions

28
packages/compat/README.md Normal file
View File

@@ -0,0 +1,28 @@
# `@react-navigation/compat`
Compatibility layer to write navigator definitions in static configuration format.
## Installation
Open a Terminal in your project's folder and run,
```sh
yarn add @react-navigation/core @react-navigation/compat
```
## Usage
```js
import { createCompatNavigatorFactory } from '@react-navigation/compat';
import { createStackNavigator } from '@react-navigation/stack';
const RootStack = createCompatNavigatorFactory(createStackNavigator)(
{
Home: { screen: HomeScreen },
Profile: { screen: ProfileScreen },
},
{
initialRouteName: 'Profile',
}
);
```