How do you safely update state when the next value depends on the previous value? | The Complete React.js Course: Zero to Production Interview Question | asif.to Tutorials