Sir can you pls tell me why I am getting this error? Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.
@arbizen2 жыл бұрын
Hey there! Thanks for watching my video. I think your useEffect hook is making an infinite loop. Here's the fix: useEffect(() => { // other stuffs }, []); You need to use "[]" as a second parameter. It means that whatever is inside the useEffect hook, it should only runs once.