Unturect typeError:无法读取空的属性(读取' usestate')
在下面附加的模块Federation Remote和主机应用程序配置中,及其A React TypeScript应用程序。
主机应用程序中使用了一个简单的按钮组件,可以看到具有默认道具的组件,但是当我使用自定义创建 recharts 组件时,组件无法在远程应用中读取传递的道具,但是如果我们记录道具显示数据。
远程
主机
host app.tsx
标记的属性是可选的,在按钮组件中,我能够读取和使用props键值,但无法使用props键Barchart组件中的价值。
错误我会得到
任何建议或解决方案,请回复。
In the module federation remote and host app configs attached below and its a react typescript applications.
A simple button component is used in the host app, able to see the component with default props but when I use the custom created recharts component not able to read the passed props in remote app but if we log the props it shows the data.
Remote
Host
Host App.tsx
Marked properties are optional, in button component i'm able to read and use the props key value but not able to use the props key value in BarChart component.
ERROR i'm getting
Any suggestion or solutions please do reply.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此问题与临时情况包装器组件有关。
我删除了包装器组件并尝试了它的工作原理,但是我需要不同的解决方案,而无需删除包装器组件。
This issue is related to ResponsiveContainer wrapper component.
I removed the wrapper component and tried it's working but I need different solution without removing the wrapper component.