mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 09:13:32 +08:00
Fix example project
This commit is contained in:
@@ -3,14 +3,9 @@
|
||||
"name": "React Navigation Tabs Example",
|
||||
"description": "Demonstrates the various capabilities of react-navigation-tabs: https://github.com/react-navigation/react-navigation-tabs",
|
||||
"slug": "react-navigation-tabs-demos",
|
||||
"sdkVersion": "27.0.0",
|
||||
"sdkVersion": "30.0.0",
|
||||
"version": "1.0.0",
|
||||
"primaryColor": "#2196f3",
|
||||
"icon": "assets/icon.png",
|
||||
"loading": {
|
||||
"icon": "assets/icon.png",
|
||||
"hideExponentText": false
|
||||
},
|
||||
"packagerOpts": {
|
||||
"assetExts": [
|
||||
"ttf"
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "react-native-scripts start",
|
||||
"android": "react-native-scripts android",
|
||||
"ios": "react-native-scripts ios"
|
||||
"start": "expo start",
|
||||
"android": "expo android",
|
||||
"ios": "expo ios"
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/vector-icons": "^6.2.0",
|
||||
"expo": "^27.0.2",
|
||||
"@react-navigation/core": "^3.0.0-alpha.4",
|
||||
"@react-navigation/native": "^3.0.0-alpha.5",
|
||||
"expo": "30",
|
||||
"hoist-non-react-statics": "^2.5.0",
|
||||
"prop-types": "^15.6.1",
|
||||
"react": "16.3.1",
|
||||
@@ -17,13 +19,12 @@
|
||||
"react-native": "~0.55.4",
|
||||
"react-native-safe-area-view": "^0.7.0",
|
||||
"react-native-tab-view": "^1.0.0",
|
||||
"react-navigation": "^2.1.0"
|
||||
"react-navigation": "^3.0.0-alpha.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-module-resolver": "^3.0.0",
|
||||
"babel-preset-expo": "^4.0.0",
|
||||
"glob-to-regexp": "^0.3.0",
|
||||
"react-native-scripts": "1.8.1"
|
||||
"glob-to-regexp": "^0.3.0"
|
||||
},
|
||||
"main": "App.js",
|
||||
"resolutions": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,8 +2,11 @@
|
||||
|
||||
import * as React from 'react';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
import { ScreenContainer } from 'react-native-screens';
|
||||
import { polyfill } from 'react-lifecycles-compat';
|
||||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import { ScreenContainer } from 'react-native-screens';
|
||||
|
||||
import createTabNavigator, {
|
||||
type InjectedProps,
|
||||
} from '../utils/createTabNavigator';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
NavigationActions,
|
||||
} from '@react-navigation/core';
|
||||
|
||||
import { createNavigationContainer } from '@react-navigation/native';
|
||||
import { createAppContainer } from '@react-navigation/native';
|
||||
|
||||
export type InjectedProps = {
|
||||
getLabelText: (props: { route: any }) => any,
|
||||
@@ -198,6 +198,6 @@ export default function createTabNavigator(TabView: React.ComponentType<*>) {
|
||||
const router = TabRouter(routes, config);
|
||||
const navigator = createNavigator(NavigationView, router, config);
|
||||
|
||||
return createNavigationContainer(navigator);
|
||||
return createAppContainer(navigator);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
import * as React from 'react';
|
||||
import { Platform, StyleSheet, View } from 'react-native';
|
||||
|
||||
// eslint-disable-next-line import/no-unresolved
|
||||
import { Screen, screensEnabled } from 'react-native-screens';
|
||||
|
||||
type Props = {
|
||||
|
||||
Reference in New Issue
Block a user