gpt4 book ai didi

react-native - 类型错误 : Converting circular structure to JSON with StorybookJS on React Native

转载 作者:行者123 更新时间:2023-12-04 10:39:55 25 4
gpt4 key购买 nike

每当我在故事书导航器中导航到一个新故事时,就会发生这种情况。谢谢!

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

enter image description here

最佳答案

我正在处理同样的问题,不幸的是我没有足够的 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com