SetState avant la fonction réagit

this.setState(
  {newState: 'whatever'},
  () => {/*do something after the state has been updated*/}
)
Xenophobic Xenomorph