You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useState sets an initial state, and setEditorState changes it right after.
State change causes the component to re-render, and once it is rendered again, the state is changed again putting it in an infinite re-render loop.
You need to use useEffect to make sure your state change runs before the component is mounted. preventing another render.
the setEditorState is causing this error:
The text was updated successfully, but these errors were encountered: