Adding react-d3 to my react-native app causes a error

自作多情 提交于 2019-12-13 02:38:16

问题


I am quite new to reactJS, and have just started working with react-native.

I added react-d3 using npm install --save-dev react-d3 but when I refresh or rebuild the app I am getting:

TypeError: undefined is not an object
(evaluating 
'require('BatchedBridge').flushedQueue')

{
 "line":1 ,
 "column": 25
}

If I remove or uninstall react-d3 from the library it works fine.

Thanks


回答1:


D3JS requires browser DOM, which React Native doesn't directly have.

The only way to possibly do this is to use a WebView to wrap the D3JS view.

It could get pretty messy, but it is doable.



来源:https://stackoverflow.com/questions/29415615/adding-react-d3-to-my-react-native-app-causes-a-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!