reactでsetStateした瞬間にstateが更新されると思われがちだが。。。(自分もそう思っていた)
実際は「renderメソッドが呼ばれて描画されるまでにはstateが更新されるようになっている」という認識に公式docを読んでから至った。
Because this.props and this.state may be updated asynchronously, you should not rely on their values for calculating the next state.
https://reactjs.org/docs/state-and-lifecycle.htmlより