I'm new to React. I'm trying to use charjs as a react component.
as soon as I add the following import statement, I get a runtime error:
import { Bar } from 'react-chartjs-2';
runtime error:
The component compiles and causes the above error?
component code:
import React from 'react';
import { Bar } from 'react-chartjs-2';
const BarChart = () => {
return (
<div>
Bar Chart
</div>
)
}
export default BarChart
What am I doing wrong?