- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
每当我在故事书导航器中导航到一个新故事时,就会发生这种情况。谢谢!
ExceptionsManager.js:126 Unhandled JS Exception: TypeError: Converting circular structure to JSON
--> starting at object with constructor 'HooksContext'
| property 'currentContext' -> object with constructor 'Object'
--- property 'hooks' closes the circle
我正在使用 React Native
0.61.5
和 @storybook/react-native
5.3.9
最佳答案
我正在处理同样的问题,不幸的是我没有足够的 Storybook 或 React Native 经验来诊断。
但是,我能够按照 https://github.com/storybookjs/storybook/issues/9294 中的描述修补模块,即“hooks.currentContext = Object.assign({}, context, { hooks: null });”
重申一下,这不是一个完美的解决方案,因为原始错误来自 currentContext 和 Hook 之间的嵌套循环关系。这只是将钩子(Hook)设置为 null 以终止循环结构。
关于react-native - 类型错误 : Converting circular structure to JSON with StorybookJS on React Native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59978070/
我想知道,在 Storybook 中模拟 React 状态的“最佳实践”是什么(例如 *.stories.js)。 目前我正在尝试实现一个黑暗主题开关。 App Component 有一个名为“dar
我正在创建自己的 React 组件库。 package.json正在使用 react和 react-dom作为对等依赖项,因为我只想为组件提供代码。然后这个包将用于其他基于 React 的项目,所以我
每当我在故事书导航器中导航到一个新故事时,就会发生这种情况。谢谢! ExceptionsManager.js:126 Unhandled JS Exception: TypeError: Conver
我是一名优秀的程序员,十分优秀!