https://www.thetechdelta.com/understanding-react-state-updates-and-batching