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.
Source:stackexchange.com