发布问题的解决方案我很难找到,尽管 Sensei 谷歌搜索技能
尽管我的带有 react-router 的应用程序运行没有任何问题 Storybook 抛出错误“不变失败:你不应该在外面使用”。
Error: Invariant failed: You should not use <Link> outside a <Router>
at invariant (tiny-invariant.esm.js:11)
at react-router-dom.js:181
at updateContextConsumer (react-dom.development.js:19747)
at beginWork$1 (react-dom.development.js:20079)
at HTMLUnknownElement.callCallback (react-dom.development.js:358)
at Object.invokeGuardedCallbackDev (react-dom.development.js:410)
at invokeGuardedCallback (react-dom.development.js:463)
at beginWork$$1 (react-dom.development.js:25730)
at performUnitOfWork (react-dom.development.js:24631)
at workLoopSync (react-dom.development.js:24613)
奇怪,因为该应用程序有效(因此没有在外面使用)。