Adding react-native-web
打包到现有的 RN 应用程序(使用react-native init
)。按照此站点的设置进行操作:
https://arry.medium.com/how-to-add-react-native-web-to-an-existing-react-native-project-eb98c952c12f https://arry.medium.com/how-to-add-react-native-web-to-an-existing-react-native-project-eb98c952c12f
该项目编译成功,但在浏览器中出现空白屏幕和循环错误:
Uncaught TypeError: Cannot read properties of undefined (reading 'isBatchingLegacy')
我找不到有关此错误的任何信息,我已跟踪相关文件,但不知道如何继续。
升级后运行测试时出现相同的错误消息反应测试渲染器软件包从 v17 到 v18。所以就我而言,我不得不降级反应测试渲染器从 v18 到 v17or升级react从 v17 到 v18 也纠正了这个错误。
根据这次讨论 https://github.com/storybookjs/storybook/pull/17865, isBatchingLegacy 是一个已弃用的函数反应测试渲染器.
所以,我不确定这一点,因为我不知道你现有的 RN 应用程序中有哪些包,但你可以检查你拥有的包版本,看看错误是否来自这里。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)