这是我面临的错误
任何人都可以帮助我解决它。我被困在这里,无法解决,这是我的代码:
import React from 'react';
import 'react-native-gesture-handler';
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import IndexScreen from './scr/screens/IndexScreen'
import {BlogProvider} from './scr/context/BlogContext';
const navigator = createStackNavigator(
{
Index: IndexScreen
},
{
initialRouteName: 'Index',
defaultNavigationOptions: {
title: 'App'
}
}
);
const App =createAppContainer(navigator);
export default()=>{
return(<BlogProvider>
<App/></BlogProvider>)}
and BlogContext code
import React from 'react';
import 'react-native-gesture-handler';
const BlogContext = React.createContext();
export const BlopProvider= ({Children})=>{
return <BlogContext.Provider>{Children}</BlogContext.Provider>
};
Blockquote
答案 0 :(得分:0)
尝试删除导入行,
import `react-native-gesture-handler`;