diff --git a/packages/animated-switch/README.md b/packages/animated-switch/README.md index 0f39bbd4..bbf13a9d 100644 --- a/packages/animated-switch/README.md +++ b/packages/animated-switch/README.md @@ -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( diff --git a/packages/animated-switch/package.json b/packages/animated-switch/package.json index eb98d698..dce89fc5 100644 --- a/packages/animated-switch/package.json +++ b/packages/animated-switch/package.json @@ -1,5 +1,5 @@ { - "name": "react-navigation-animated-switch-navigator", + "name": "react-navigation-animated-switch", "version": "0.1.0", "description": "", "main": "index.js",