mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-28 20:35:19 +08:00
refactor: move types and base router to routers package
This commit is contained in:
@@ -29,11 +29,10 @@
|
||||
"prepare": "bob build",
|
||||
"clean": "del lib"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-navigation/routers": "^5.0.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@react-native-community/bob": "^0.9.3",
|
||||
"@react-navigation/native": "^5.0.0",
|
||||
"del-cli": "^3.0.0",
|
||||
"react-native-screens": "^2.0.0-beta.2",
|
||||
"typescript": "^3.7.5"
|
||||
|
||||
@@ -3,14 +3,11 @@ import {
|
||||
createNavigatorFactory,
|
||||
useNavigationBuilder,
|
||||
EventArg,
|
||||
} from '@react-navigation/native';
|
||||
|
||||
import {
|
||||
StackRouter,
|
||||
StackNavigationState,
|
||||
StackRouterOptions,
|
||||
StackActions,
|
||||
} from '@react-navigation/routers';
|
||||
} from '@react-navigation/native';
|
||||
|
||||
import {
|
||||
screensEnabled,
|
||||
|
||||
@@ -8,11 +8,9 @@ import {
|
||||
NavigationHelpers,
|
||||
NavigationProp,
|
||||
ParamListBase,
|
||||
} from '@react-navigation/native';
|
||||
import {
|
||||
StackNavigationState,
|
||||
StackRouterOptions,
|
||||
} from '@react-navigation/routers';
|
||||
} from '@react-navigation/native';
|
||||
|
||||
export type NativeStackNavigationEventMap = {
|
||||
/**
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
import * as React from 'react';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
import { StackNavigationState, StackActions } from '@react-navigation/routers';
|
||||
|
||||
import {
|
||||
ScreenStack,
|
||||
Screen as ScreenComponent,
|
||||
ScreenProps,
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
} from 'react-native-screens';
|
||||
import { useTheme } from '@react-navigation/native';
|
||||
import {
|
||||
StackNavigationState,
|
||||
StackActions,
|
||||
useTheme,
|
||||
} from '@react-navigation/native';
|
||||
import HeaderConfig from './HeaderConfig';
|
||||
import {
|
||||
NativeStackNavigationHelpers,
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"extends": "../../tsconfig",
|
||||
"references": [
|
||||
{ "path": "../core" },
|
||||
{ "path": "../native" },
|
||||
{ "path": "../routers" }
|
||||
{ "path": "../routers" },
|
||||
{ "path": "../native" }
|
||||
],
|
||||
"compilerOptions": {
|
||||
"outDir": "./lib/typescript"
|
||||
|
||||
Reference in New Issue
Block a user