我正在学习react native并正在expo.io上工作,因为react native中的stackNavigation已更改,因此我在代码中进行了相应更改,但出现以下错误:
Device: (970:881) undefined is not an object (evaluating 'g.ThemeColors.light')
Evaluating module://react-navigation-stack.js
Evaluating module://App.js.js
Loading module://App.js
这是我的app.js代码,基本上是通过屏幕导航。
import * as React from 'react';
import {
Text,
TextInput,
Button,
View,
StyleSheet,
} from 'react-native';
import { Constants } from 'expo';
import { createStackNavigator } from 'react-navigation-stack';
import { createAppContainer } from 'react-navigation';
// You can import from local files
import SignupView from './components/Screens/SignUpView';
import HomePage from './components/Screens/HomePage';
import SuperAdminHome from './components/Screens/SuperAdminHome';
import Departments from './components/Screens/Departments';
// or any pure javascript modules available in npm
import { Card } from 'react-native-paper';
const AppNavigator = createStackNavigator({
//SplashView:{screen:Splash},
HomePageScreen:{screen:HomePage},
SignupScreen: { screen: SignupView },
SuperAdminView:{screen:SuperAdminHome},
DepartmentsView:{screen:Departments},
});
const AppContainer = createAppContainer(AppNavigator);
export default AppContainer;