remix.run and Fusion图表
在A react-fusionCharts remix.run 应用程序似乎不起作用吗?有解决方法吗?
reactfc.fcroot(fusionCharts,column2d,gammeltheme)
我会遇到此错误:
reference> Reference eRror:未定义文档
也有意义,因为Remix使用SSR,但即使我使用这个安全的后卫失败了(推荐的方法来自 remix docs < /a>):
if (typeof document !== 'undefined') {
ReactFC.fcRoot(FusionCharts, Column2D, GammelTheme)
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该组件需要包裹在
clientonly
组件中,来自 -utils 。这样,组件只会仅在客户端上渲染,并且不会受到服务器渲染的效果。The component needs to be wrapped inside a
ClientOnly
component fromremix-utils
. This way, the component will render only on the client and will not be server-rendered.