Open wumian27 opened 2 years ago
报错的内容是啥?
react-dom.development.js:22680 Uncaught Error: [mobx-state-tree] Value undefined is no MST Node
at Vt (sdk.js:893:30276)
at mt (sdk.js:893:28892)
at E (sdk.js:893:3301)
at r.componentWillUnmount (sdk.js:1921:3294)
at r.h (sdk.js:1551:1236)
at r.
看起来好像不是和 cache-route 直接相关的报错,有可能是 mobx 的错误吗?
但是用react17的 ReactDOM.render 可以正常使用 ,下面错误还有 react-dom.development.js:18535 The above error occurred in the <WithStore(t)> component:
at r (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:1921:426)
at o (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:1923:2907)
at t (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:2039:778)
at t (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:2039:2712)
at t (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:2029:497)
at t (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:2025:324)
at a (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:1951:1004)
at a (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:1713:1498)
at t (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:2041:454)
at o (https://ux-assest.jlpay.com/emp/amis-dev/sdk.js:1923:2907)
at div
at SchemaRender (http://10.150.129.21:8092/static/js/src_bootstrap_tsx.077d1146.js:128:66)
at C (https://ux-assest.jlpay.com/emp/react-router-dom/react-router-dom.js:3545:39)
at Updatable (http://10.150.129.21:8092/static/js/vendors-node_modules_babel_runtime_helpers_asyncToGenerator_js-node_modules_babel_runtime_hel-9d5752.1e9fd295.js:17746:5)
at Suspender (http://10.150.129.21:8092/static/js/vendors-node_modules_babel_runtime_helpers_asyncToGenerator_js-node_modules_babel_runtime_hel-9d5752.1e9fd295.js:17622:5)
at Suspense
at Freeze (http://10.150.129.21:8092/static/js/vendors-node_modules_babel_runtime_helpers_asyncToGenerator_js-node_modules_babel_runtime_hel-9d5752.1e9fd295.js:17663:22)
at DelayFreeze (http://10.150.129.21:8092/static/js/vendors-node_modules_babel_runtime_helpers_asyncToGenerator_js-node_modules_babel_runtime_hel-9d5752.1e9fd295.js:17691:5)
at Updatable$1 (http://10.150.129.21:8092/static/js/vendors-node_modules_babel_runtime_helpers_asyncToGenerator_js-node_modules_babel_runtime_hel-9d5752.1e9fd295.js:17771:22)
at div
如果不用[react-router-cache-route 页面不会报错,正常使用
close DelayFreeze and export default Updatable will well.
export default (props) => (
<Updatable {...props} />
)
and why add freezeTimeout?
切换路由从新回到已经切换的路由, 会报错 但用 ReactDOM.render()不会报错