【问题标题】:React-native and react dependency conflictsReact-native 和 react 依赖冲突
【发布时间】:2017-05-12 09:20:44
【问题描述】:

目前我正在使用 React Native 0.42.0 和 React 15.4.2,并且有一个错误修复:0.44.0 中的 Fix crash if native code tries to update the size of a modal view after JS has removed it 是 React Native 的最新版本。我想更新最新版本,但它需要 16.0.0-alpha.6 React 版本。有问题,因为其他 npm 包不支持 React 的 alpha 版本,它们需要 15.x.x 版本。

这个问题的正确解决方案是什么?

package.json里面有我相关的部分:

  "dependencies": {
    "axios": "^0.16.1",
    "lodash": "^4.17.4",
    "querystring": "^0.2.0",
    "react": "16.0.0-alpha.6",
    "react-addons-pure-render-mixin": "^15.4.2",
    "react-native": "0.44.0",
    "react-native-cookies": "^3.1.0",
    "react-native-device-info": "^0.10.2",
    "react-native-lazyload": "^1.1.0",
    "react-native-router-flux": "^3.38.0",
    "react-native-swiper": "^1.5.4",
    "react-native-vector-icons": "^4.0.0",
    "react-navigation": "^1.0.0-beta.7",
    "react-redux": "^5.0.3",
    "redux": "^3.6.0",
    "redux-thunk": "^2.2.0"
  },

【问题讨论】:

    标签: javascript node.js reactjs npm react-native


    【解决方案1】:

    我不知道这是否可以作为回应,但在我遇到同样问题的情况下,我只可能更新到最新版本,而不依赖于 react 的 alpha 版本(0.42),我们需要等到下一个 React.js 版本出来。

    我听到的官方解释是,react-native 采取了一些 React Fiber 考虑因素,目前 React.js 中不包括

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-02-26
      • 2021-07-19
      • 2022-10-23
      • 2018-04-24
      • 2021-12-05
      • 2022-10-24
      • 2023-01-30
      • 2017-12-23
      相关资源
      最近更新 更多