Chartjs-Getting TypeError: (intermediate value).Bar is not a function with react and chart.js

1👍

Chart.js defines a Chart class, which you’re trying to use, but you’re overwriting it by creating a React component named Chart, so when your component tries to use the Chart.js Chart class, it instead sees itself, the React component, and fails. Pick a different name so you’re not overwriting it.

Leave a comment