ExNavigation 抛出一个错误说 initialRoute is not defined

ExNavigation throws an error saying initialRoute is not defined

嗨,我是 Expo 的新手,但我一直很难尝试 运行 我的代码。我一直卡在错误中:You must specify initialRoute or initialStack to initialize this StackNavigation 即使我已经设置好了。

这是我的 main.js

import Expo from 'expo'
import React from 'react'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import {
  NavigationProvider,
  StackNavigation,
} from '@expo/ex-navigation'
import RootReducer from './src/reducers'
import Router from './src/navigation/Router'

const store = createStore(RootReducer)

const App = () => (
  <Provider store={store}>
    <NavigationProvider router={Router}>
      <StackNavigation intitialRoute={Router.getRoute('splash')} />
    </NavigationProvider>
  </Provider>
)

Expo.registerRootComponent(App)

这是我的 Router.js

import { createRouter } from '@expo/ex-navigation'

// Screens
import SplashScreen from '../screens/SplashScreen'
import LoginScreen from '../screens/LoginScreen'

const Router = createRouter(() => ({
  splash: () => SplashScreen,
  login: () => LoginScreen,
}))

export default Router

我的设置似乎有什么问题?我只是按照 ExNavigation.

上的例子

这是我在 Sketch 上的示例,但无法做到 运行 但将保留 link 以获得完整代码。

您在这部分代码中的道具名称有错字

<StackNavigation intitialRoute={Router.getRoute('splash')} />

initialRoute而不是intitialRoute