在 react-native 0.59.10 中使用 react-navigation

using react-navigation in react-native 0.59.10

我正在用 react-native 0.59.10 做一个项目 当我想安装 reac-navigation、react-native-gesture-handler 和 react-native-reanimated 时。 我遇到了错误并且项目没有构建,我应该使用它们各自的特定版本吗?

由于您使用的是 react-native 0.59.10 该库的最新版本可能不兼容。

根据您的要求,

  • react-native-gesture-handler 版本介于 1.1.01.4.0 之间。 Check this official documentation 获取更多信息。
  • react-navigation 需要 react-native@^0.54.x。由于 react-navigation@3.x 依赖于新的 React.createContext API,它是在 react@16.3.x.
  • 中添加的