Closed mrcongliu closed 1 year ago
Thanks for the report. Can you provide a minimal reproducible example that demonstrates the issue?
Sure, here it is.
That's not a minimal example. Try to reduce the code to the essential to demonstrate the problem.
The createClassFromSpec
API seems to be a little different from the documentation. Try this instead:
const BarChart = createClassFromSpec({ mode: 'vega', spec: spec });
Thanks, @liuhenry, your suggestion worked! Probably we should update the documentation. But for now, I'll close this issue.
Approach#1
Create class from spec, then get a React class to use
cannot render anything in React App.Please see whether you can reproduce this issue, if so, please fix your documentation. Thanks.
My file structure: -index.js -App.js -Components/BarChart.js
My
BarChart.js
:My
App.js
:My
index.js
: