mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-06-18 07:28:54 +08:00
refactor: import from /native instead of /core
This commit is contained in:
@@ -35,7 +35,7 @@ Navigators bundle a router and a view which takes the navigation state and decid
|
||||
A simple navigator could look like this:
|
||||
|
||||
```js
|
||||
import { createNavigatorFactory } from '@react-navigation/core';
|
||||
import { createNavigatorFactory } from '@react-navigation/native';
|
||||
|
||||
function StackNavigator({ initialRouteName, children, ...rest }) {
|
||||
// The `navigation` object contains the navigation state and some helpers (e.g. push, pop)
|
||||
@@ -256,7 +256,7 @@ Sometimes we want to run side-effects when a screen is focused. A side effect ma
|
||||
To make this easier, the library exports a `useFocusEffect` hook:
|
||||
|
||||
```js
|
||||
import { useFocusEffect } from '@react-navigation/core';
|
||||
import { useFocusEffect } from '@react-navigation/native';
|
||||
|
||||
function Profile({ userId }) {
|
||||
const [user, setUser] = React.useState(null);
|
||||
@@ -285,7 +285,7 @@ The `useFocusEffect` is analogous to React's `useEffect` hook. The only differen
|
||||
We might want to render different content based on the current focus state of the screen. The library exports a `useIsFocused` hook to make this easier:
|
||||
|
||||
```js
|
||||
import { useIsFocused } from '@react-navigation/core';
|
||||
import { useIsFocused } from '@react-navigation/native';
|
||||
|
||||
// ...
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { View, TextInput, ActivityIndicator, StyleSheet } from 'react-native';
|
||||
import { Title, Button } from 'react-native-paper';
|
||||
import { ParamListBase } from '@react-navigation/core';
|
||||
import { ParamListBase } from '@react-navigation/native';
|
||||
import {
|
||||
createStackNavigator,
|
||||
HeaderBackButton,
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from 'react';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
import { Button } from 'react-native-paper';
|
||||
import { useSafeArea } from 'react-native-safe-area-context';
|
||||
import { RouteProp, ParamListBase } from '@react-navigation/core';
|
||||
import { RouteProp, ParamListBase } from '@react-navigation/native';
|
||||
import {
|
||||
createStackNavigator,
|
||||
StackNavigationProp,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
RouteProp,
|
||||
ParamListBase,
|
||||
useFocusEffect,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import { DrawerNavigationProp } from '@react-navigation/drawer';
|
||||
import { StackNavigationProp } from '@react-navigation/stack';
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
import { Button } from 'react-native-paper';
|
||||
import { RouteProp, ParamListBase } from '@react-navigation/core';
|
||||
import { RouteProp, ParamListBase } from '@react-navigation/native';
|
||||
import {
|
||||
createStackNavigator,
|
||||
StackNavigationProp,
|
||||
|
||||
@@ -6,10 +6,8 @@ import { Asset } from 'expo-asset';
|
||||
import {
|
||||
InitialState,
|
||||
getStateFromPath,
|
||||
NavigationContainerRef,
|
||||
} from '@react-navigation/core';
|
||||
import {
|
||||
useLinking,
|
||||
NavigationContainerRef,
|
||||
NavigationNativeContainer,
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
|
||||
@@ -7,7 +7,7 @@ Bottom tab navigator for React Navigation following iOS design guidelines.
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/bottom-tabs
|
||||
yarn add @react-navigation/native @react-navigation/bottom-tabs
|
||||
```
|
||||
|
||||
Now we need to install [`react-native-safe-area-context`](https://github.com/th3rdwave/react-native-safe-area-context).
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
"@react-navigation/native": "^5.0.0-alpha.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-safe-area-context": "^0.3.6"
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
useNavigationBuilder,
|
||||
createNavigatorFactory,
|
||||
DefaultNavigatorOptions,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
TabRouter,
|
||||
TabRouterOptions,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
NavigationProp,
|
||||
ParamListBase,
|
||||
Descriptor,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import { TabNavigationState } from '@react-navigation/routers';
|
||||
|
||||
export type BottomTabNavigationEventMap = {
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
Route,
|
||||
NavigationContext,
|
||||
CommonActions,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import { SafeAreaConsumer } from 'react-native-safe-area-context';
|
||||
|
||||
import BottomTabItem from './BottomTabItem';
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
ViewStyle,
|
||||
TextStyle,
|
||||
} from 'react-native';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
|
||||
import TabBarIcon from './TabBarIcon';
|
||||
import { BottomTabBarButtonProps } from '../types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
|
||||
type Props = {
|
||||
route: Route<string>;
|
||||
|
||||
@@ -7,7 +7,7 @@ Compatibility layer to write navigator definitions in static configuration forma
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/compat
|
||||
yarn add @react-navigation/native @react-navigation/compat
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
"@react-navigation/native": "^5.0.0-alpha.0",
|
||||
"react": "~16.9.0"
|
||||
},
|
||||
"@react-native-community/bob": {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
NavigationProp,
|
||||
ParamListBase,
|
||||
RouteProp,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import ScreenPropsContext from './ScreenPropsContext';
|
||||
import createCompatNavigationProp from './createCompatNavigationProp';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CommonActions, NavigationState } from '@react-navigation/core';
|
||||
import { CommonActions, NavigationState } from '@react-navigation/native';
|
||||
|
||||
export function navigate({
|
||||
routeName,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CommonActions } from '@react-navigation/core';
|
||||
import { CommonActions } from '@react-navigation/native';
|
||||
import { StackActions, StackActionType } from '@react-navigation/routers';
|
||||
|
||||
export function reset(): CommonActions.Action {
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
ParamListBase,
|
||||
NavigationProp,
|
||||
RouteProp,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import * as helpers from './helpers';
|
||||
import { CompatNavigationProp } from './types';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
TypedNavigator,
|
||||
NavigationProp,
|
||||
RouteProp,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import CompatScreen from './CompatScreen';
|
||||
import ScreenPropsContext from './ScreenPropsContext';
|
||||
import createCompatNavigationProp from './createCompatNavigationProp';
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
useNavigationBuilder,
|
||||
createNavigatorFactory,
|
||||
DefaultNavigatorOptions,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
TabRouter,
|
||||
TabRouterOptions,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ParamListBase, NavigationProp, Route } from '@react-navigation/core';
|
||||
import { ParamListBase, NavigationProp, Route } from '@react-navigation/native';
|
||||
import * as helpers from './helpers';
|
||||
|
||||
export type CompatNavigationProp<
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
useRoute,
|
||||
NavigationProp,
|
||||
ParamListBase,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import createCompatNavigationProp from './createCompatNavigationProp';
|
||||
import { CompatNavigationProp } from './types';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { NavigationProp, ParamListBase } from '@react-navigation/core';
|
||||
import { NavigationProp, ParamListBase } from '@react-navigation/native';
|
||||
import useCompatNavigation from './useCompatNavigation';
|
||||
import { CompatNavigationProp } from './types';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { useIsFocused } from '@react-navigation/core';
|
||||
import { useIsFocused } from '@react-navigation/native';
|
||||
|
||||
type InjectedProps = {
|
||||
isFocused: boolean;
|
||||
|
||||
@@ -7,7 +7,7 @@ Bottom tab navigator for React Navigation following iOS design guidelines.
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/drawer
|
||||
yarn add @react-navigation/native @react-navigation/drawer
|
||||
```
|
||||
|
||||
Now we need to install [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler), [`react-native-reanimated`](https://github.com/kmagiera/react-native-reanimated) and [`react-native-safe-area-context`](https://github.com/th3rdwave/react-native-safe-area-context).
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
"@react-navigation/native": "^5.0.0-alpha.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-gesture-handler": "^1.0.0",
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
createNavigatorFactory,
|
||||
useNavigationBuilder,
|
||||
DefaultNavigatorOptions,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
DrawerNavigationState,
|
||||
DrawerRouterOptions,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
NavigationProp,
|
||||
Descriptor,
|
||||
NavigationHelpers,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import { DrawerNavigationState } from '@react-navigation/routers';
|
||||
import { PanGestureHandler } from 'react-native-gesture-handler';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import { CommonActions } from '@react-navigation/core';
|
||||
import { CommonActions } from '@react-navigation/native';
|
||||
import {
|
||||
DrawerActions,
|
||||
DrawerNavigationState,
|
||||
|
||||
@@ -7,7 +7,7 @@ React Navigation integration for [bottom navigation](https://material.io/design/
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/material-bottom-tabs
|
||||
yarn add @react-navigation/native @react-navigation/material-bottom-tabs
|
||||
```
|
||||
|
||||
Setup `react-native-paper` following the [Getting Started guide](https://callstack.github.io/react-native-paper/getting-started.html).
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
"@react-navigation/native": "^5.0.0-alpha.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-paper": "^3.0.0",
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
useNavigationBuilder,
|
||||
createNavigatorFactory,
|
||||
DefaultNavigatorOptions,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
TabRouter,
|
||||
TabRouterOptions,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
Descriptor,
|
||||
NavigationProp,
|
||||
NavigationHelpers,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import { TabNavigationState } from '@react-navigation/routers';
|
||||
|
||||
export type MaterialBottomTabNavigationEventMap = {
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from 'react';
|
||||
import { StyleSheet } from 'react-native';
|
||||
import { BottomNavigation } from 'react-native-paper';
|
||||
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
import { TabNavigationState, TabActions } from '@react-navigation/routers';
|
||||
|
||||
import {
|
||||
|
||||
@@ -7,7 +7,7 @@ React Navigation integration for animated tab view component from [`react-native
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/material-top-tabs react-native-tab-view
|
||||
yarn add @react-navigation/native @react-navigation/material-top-tabs react-native-tab-view
|
||||
```
|
||||
|
||||
Now we need to install [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler) and [`react-native-reanimated`](https://github.com/kmagiera/react-native-reanimated)..
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
"@react-navigation/native": "^5.0.0-alpha.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-gesture-handler": "^1.0.0",
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
useNavigationBuilder,
|
||||
createNavigatorFactory,
|
||||
DefaultNavigatorOptions,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
TabRouter,
|
||||
TabRouterOptions,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
NavigationHelpers,
|
||||
Route,
|
||||
NavigationProp,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import { TabNavigationState } from '@react-navigation/routers';
|
||||
|
||||
export type MaterialTopTabNavigationEventMap = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { View, Text, StyleSheet } from 'react-native';
|
||||
import { TabBar } from 'react-native-tab-view';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
|
||||
import { MaterialTopTabBarProps } from '../types';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
import { TabView, SceneRendererProps } from 'react-native-tab-view';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
import { TabNavigationState, TabActions } from '@react-navigation/routers';
|
||||
|
||||
import MaterialTopTabBar from './MaterialTopTabBar';
|
||||
|
||||
@@ -9,7 +9,7 @@ Expo is currently not supported as it includes an older version of `react-native
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/native-stack
|
||||
yarn add @react-navigation/native @react-navigation/native-stack
|
||||
```
|
||||
|
||||
Now we need to install [`react-native-screens`](https://github.com/kmagiera/react-native-screens).
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
"@react-navigation/native": "^5.0.0-alpha.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-screens": "^2.0.0-alpha.8"
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
createNavigatorFactory,
|
||||
useNavigationBuilder,
|
||||
EventArg,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
|
||||
import {
|
||||
StackRouter,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
NavigationHelpers,
|
||||
NavigationProp,
|
||||
ParamListBase,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
StackNavigationState,
|
||||
StackRouterOptions,
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
ScreenStackHeaderRightView,
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
} from 'react-native-screens';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
import { NativeStackNavigationOptions } from '../types';
|
||||
|
||||
type Props = NativeStackNavigationOptions & {
|
||||
|
||||
@@ -7,7 +7,7 @@ React Native integration for React Navigation
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/native
|
||||
yarn add @react-navigation/native
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
"prepare": "bob build",
|
||||
"clean": "del lib"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.27"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@react-native-community/bob": "^0.7.0",
|
||||
"@types/react": "^16.9.11",
|
||||
@@ -39,7 +42,6 @@
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
"react": "*",
|
||||
"react-native": "*"
|
||||
},
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export * from '@react-navigation/core';
|
||||
|
||||
export { default as NavigationNativeContainer } from './NavigationNativeContainer';
|
||||
|
||||
export { default as useBackButton } from './useBackButton';
|
||||
|
||||
@@ -9,7 +9,7 @@ You probably don't need to use this package directly if you're not building cust
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/routers
|
||||
yarn add @react-navigation/routers
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -17,7 +17,7 @@ yarn add @react-navigation/core @react-navigation/routers
|
||||
A basic custom navigator bundling a router and a view looks like this:
|
||||
|
||||
```js
|
||||
import { createNavigatorFactory, useNavigationBuilder } from '@react-navigation/core';
|
||||
import { createNavigatorFactory, useNavigationBuilder } from '@react-navigation/native';
|
||||
import { StackRouter } from '@react-navigation/routers';
|
||||
|
||||
function StackNavigator({ initialRouteName, children, ...rest }) {
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"clean": "del lib"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.27",
|
||||
"shortid": "^2.2.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -36,9 +37,6 @@
|
||||
"del-cli": "^3.0.0",
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-navigation/core": "^5.0.0-alpha.0"
|
||||
},
|
||||
"@react-native-community/bob": {
|
||||
"source": "src",
|
||||
"output": "lib",
|
||||
|
||||
@@ -7,7 +7,7 @@ Stack navigator for React Navigation.
|
||||
Open a Terminal in your project's folder and run,
|
||||
|
||||
```sh
|
||||
yarn add @react-navigation/core @react-navigation/stack @react-native-community/masked-view
|
||||
yarn add @react-navigation/native @react-navigation/stack @react-native-community/masked-view
|
||||
```
|
||||
|
||||
Now we need to install [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler), [`react-native-reanimated`](https://github.com/kmagiera/react-native-reanimated), [`react-native-screens`](https://github.com/kmagiera/react-native-screens) and [`react-native-safe-area-context`](https://github.com/th3rdwave/react-native-safe-area-context).
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@react-native-community/masked-view": "^0.1.1",
|
||||
"@react-navigation/core": "^5.0.0-alpha.0",
|
||||
"@react-navigation/native": "^5.0.0-alpha.0",
|
||||
"react": "*",
|
||||
"react-native": "*",
|
||||
"react-native-gesture-handler": "^1.0.0",
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
createNavigatorFactory,
|
||||
DefaultNavigatorOptions,
|
||||
EventArg,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
StackRouter,
|
||||
StackRouterOptions,
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
Descriptor,
|
||||
Route,
|
||||
NavigationHelpers,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import { StackNavigationState } from '@react-navigation/routers';
|
||||
|
||||
export type StackNavigationEventMap = {
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
NavigationContext,
|
||||
Route,
|
||||
ParamListBase,
|
||||
} from '@react-navigation/core';
|
||||
} from '@react-navigation/native';
|
||||
import { StackNavigationState } from '@react-navigation/routers';
|
||||
import { EdgeInsets } from 'react-native-safe-area-context';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
} from 'react-native';
|
||||
import Animated from 'react-native-reanimated';
|
||||
import { EdgeInsets } from 'react-native-safe-area-context';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
import HeaderBackButton from './HeaderBackButton';
|
||||
import HeaderBackground from './HeaderBackground';
|
||||
import memoize from '../../utils/memoize';
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as React from 'react';
|
||||
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
|
||||
import Animated from 'react-native-reanimated';
|
||||
import { StackNavigationState } from '@react-navigation/routers';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
import { Props as HeaderContainerProps } from '../Header/HeaderContainer';
|
||||
import Card from './Card';
|
||||
import { Scene, Layout, StackHeaderMode, TransitionPreset } from '../../types';
|
||||
|
||||
@@ -11,7 +11,7 @@ import Animated from 'react-native-reanimated';
|
||||
import { EdgeInsets } from 'react-native-safe-area-context';
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import * as Screens from 'react-native-screens'; // Import with * as to prevent getters being called
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
import { StackNavigationState } from '@react-navigation/routers';
|
||||
|
||||
import { getDefaultHeaderHeight } from '../Header/HeaderSegment';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { Platform } from 'react-native';
|
||||
import { SafeAreaConsumer, EdgeInsets } from 'react-native-safe-area-context';
|
||||
import { Route } from '@react-navigation/core';
|
||||
import { Route } from '@react-navigation/native';
|
||||
import { StackActions, StackNavigationState } from '@react-navigation/routers';
|
||||
|
||||
import CardStack from './CardStack';
|
||||
|
||||
Reference in New Issue
Block a user