I am trying to update the state with a localStorage value in DidMount, but it is not updating:
type Props = { }; type State = { id_evaluation: string, }; c
this.setState is an async function.
this.setState({ id_evaluation: '1', }, () => console.log('2 - ', this.state.id_evaluation));
Callback function would solve your problem.