Simplifying state management in React apps with batched updates Blog

added by JavaScript Kicks
9/11/2019 6:38:22 AM

1069 Views

After making an update to your component's state using either useState or this.setState, parts of the component re-renders depending on the update. More so, if you have various calls to update the state within a React event handler like onClick, React makes the updates in a batch, instead of one at a time, reducing the number of renders the component will make.


0 comments