React may batch multiple setState() calls into a single update for better performance.
so its not an actual race condition b/w two parallel instructions, but rather just a result of an optimisation performed by react
React may batch multiple setState() calls into a single update for better performance.
so its not an actual race condition b/w two parallel instructions, but rather just a result of an optimisation performed by react