Reputation: 83
I am trying to use Lightning Chart with React Native and I immediately ran into an error.
I used yarn to install @arction/lcjs and then at the top of my App.js wrote...
import { lightningChart } from '@arction/lcjs';
The error message I am then greeted with is...
Error: Requiring module "node_modules/@arction/lcjs/dist/lcjs.js", which threw an exception: TypeError: Si.atob is not a function. (In 'Si.atob(aV[t[0]][r].toString())', 'Si.atob' is undefined)
Process terminated. Press <enter> to close the window
Any pointers would be appreciated!
Upvotes: 1
Views: 245
Reputation: 2620
LightningChart JS isn't React Native compatible directly. You will need to load it inside a WebView. For React Native compatible WebView implementation you can use library like React Native WebView. Inside the WebView LightningChart JS can be used just like you would use inside a browser.
Upvotes: 1