1

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

Cory Danielson
  • 14,314
  • 3
  • 44
  • 51
ven
  • 21
  • 3
  • You can't just magically use web-React modules in your React Native project. There are loads of things from the browser that aren't available in React Native. – Colin Ramsay Apr 02 '15 at 14:47
  • 1
    Like I said am new to this so and can't seem to find documentation on use. Can you point me in the right direction? – ven Apr 02 '15 at 14:49

1 Answers1

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.

JayGarcia
  • 190
  • 1
  • 4
  • Thank you. After spending the last few days with it seems to be the only way so far. – ven Apr 03 '15 at 22:41