升级mobx-react后路由无效

发布于 2022-09-06 00:42:43 字数 1669 浏览 18 评论 0

我把mobx-react升级到最新版本之后,路由跳转就无效了,什么错误,警告都没有,完全不知道是哪里的问题。。
有没有遇到过相同问题的指点一下。。
react-router用的4.0
下面贴上主要的文件

  "devDependencies": {
    "babel-core": "6.23.1",
    "babel-loader": "6.3.2",
    "babel-plugin-import": "1.1.1",
    "babel-plugin-transform-async-to-generator": "6.16.0",
    "babel-plugin-transform-decorators-legacy": "^1.3.4",
    "babel-polyfill": "6.23.0",
    "babel-preset-es2015": "6.22.0",
    "babel-preset-react": "6.16.0",
    "babel-preset-stage-0": "6.16.0",
    "copy-webpack-plugin": "4.0.1",
    "css-loader": "0.25.0",
    "extract-text-webpack-plugin": "2.1.2",
    "file-loader": "^0.11.2",
    "html-webpack-plugin": "2.22.0",
    "image-webpack-loader": "2.0.0",
    "less": "2.7.2",
    "less-loader": "4.0.4",
    "postcss-loader": "0.13.0",
    "react-hot-loader": "next",
    "resolve-url-loader": "1.6.0",
    "rimraf": "2.5.4",
    "style-loader": "0.13.1",
    "url-loader": "0.5.7",
    "webpack": "2.4.1",
    "webpack-dev-server": "2.4.5"
  },
  "dependencies": {
    "antd": "^2.12.1",
    "axios": "0.15.0",
    "css-declaration-sorter": "2.0.0",
    "css-mqpacker": "5.0.1",
    "echarts": "^3.6.2",
    "faker": "3.1.0",
    "history": "4.6.1",
    "http-server": "0.10.0",
    "lazy-route": "1.0.7",
    "lodash": "4.17.4",
    "mobx": "^3.2.1",
    "mobx-react": "^4.2.2",
    "mobx-react-devtools": "^4.2.15",
    "moment": "2.15.1",
    "package": "1.0.1",
    "postcss-cssnext": "2.10.0",
    "qs": "6.3.1",
    "query-string": "^4.3.4",
    "react": "^15.6.1",
    "react-dom": "^15.6.1",
    "react-router-dom": "^4.1.2",
    "rfx-core": "1.5.3",
    "whatwg-fetch": "1.0.0"
  },

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

逆光下的微笑 2022-09-13 00:42:43

加个@withrouter注解

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文