What happens if you call setState() inside componentDidMount()?
Calling setState() inside componentDidMount() is valid and will trigger an extra rendering, but it happens before the browser updates the screen. This means the user won't see the intermediate state, although the component will render twice in this cycle, potentially affecting performance.