
Uncaught Error: Too many re-renders. React limits the number of renders to prevent an infinite loop.
The error message “Too many re-renders” means your components are rendering in a loop, it is something that React has guard against for performance issues. This often happens when a state update causes the rendering of the component’s view which in turn causes another state update among other things. Effectively, what you have done is…