Using Prevstate To Avoid React Batching Codesandbox

Using Prevstate To Avoid React Batching Codesandbox