A common React pitfall is causing infinite loops by creating new object references in the render body and passing them as dependencies to useEffect.
UserProfile component that is currently crashing the browser (simulated)fetchUser function is being recreated on every renderuseEffect, it triggers another render, creating a loopuseCallback or move the function inside the effect to fix itSubmit your code to see test results