Infinite Loop while give the array dependencies in useEffect() from client side
Answered
Αμμάν Ριζουάν posted this in #help-forum
Answered by B33fb0n3
don't use useEffect hooks for data fetching. You will run into errors/bugs like you see now. Use a clientside fetching library like SWR or React Query and the issues are gone
2 Replies
@Αμμάν Ριζουάν i need to re render when something change but it will stuck in the infinite loop
don't use useEffect hooks for data fetching. You will run into errors/bugs like you see now. Use a clientside fetching library like SWR or React Query and the issues are gone
Answer