mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 09:13:32 +08:00
Rename it
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
# react-navigation-animated-switch-navigator
|
||||
# react-navigation-animated-switch
|
||||
|
||||
This navigator uses the [Reanimated Transitions API](https://github.com/kmagiera/react-native-reanimated) to animate route change transitions. Aside from the animations, it is identical to the standard [switch navigator](https://reactnavigation.org/docs/en/switch-navigator.html).
|
||||
|
||||
## Installation
|
||||
|
||||
- [Install react-native-reanimated >= 1.0.0](https://github.com/kmagiera/react-native-reanimated#installation) if you have not already (the alpha version will not work!). If you have a managed Expo project, you need to use >= SDK 33 to have the correct version of Reanimated.
|
||||
- Install `react-navigation-animated-switch-navigator` with your favorite JS package manager.
|
||||
- Install `react-navigation-animated-switch` with your favorite JS package manager.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import createAnimatedSwitchNavigator from 'react-navigation-animated-switch';
|
||||
|
||||
const MySwitch = createAnimatedSwitchNavigator({
|
||||
Home: HomeScreen,
|
||||
Other: OtherScreen,
|
||||
@@ -19,6 +21,7 @@ const MySwitch = createAnimatedSwitchNavigator({
|
||||
Ta da! When you change between routes the screens will cross-fade with each other. You can customize the transition using the `transition` prop:
|
||||
|
||||
```js
|
||||
import createAnimatedSwitchNavigator from 'react-navigation-animated-switch';
|
||||
import { Transition } from 'react-native-reanimated';
|
||||
|
||||
const MySwitch = createAnimatedSwitchNavigator(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "react-navigation-animated-switch-navigator",
|
||||
"name": "react-navigation-animated-switch",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
|
||||
Reference in New Issue
Block a user