Cannot update a component (`ExampleComponent`)
while rendering a different component (`MyComponent`). To locate the
bad setState() call inside `MyComponent`
when you try to update the state directly inside the render() method or function body, rather than inside a useEffect hook or a lifecycle method.To avoid this, make sure that any state updates or side effects are handled outside of the render phase, such as within useEffect.