Chartjs-React: reusable component keeps failing (too many renders | value doesn't show | uncaught errors | …)

1👍

The useEffect inside your DataPie component has no dependency, this means it will run on every render. And, the useEffect itself causes the component to re-render (by calling useState). So, an infinite re-render is created here.

Leave a comment