Closed ericlentz closed 2 years ago
useEffect causes the page to constantly call getShoppingList(), infinitely. Instead, use useEffectOnce and it will only call it on load. All other calls are handled via the onSubmit, so no need to call it constantly.
Thank you for your contribution, @ericlentz! 🎉
useEffect causes the page to constantly call getShoppingList(), infinitely. Instead, use useEffectOnce and it will only call it on load. All other calls are handled via the onSubmit, so no need to call it constantly.