Hello @kartik,
The method setState() takes a callback. And this is where we get updated state.
Consider this example.
this.setState(
{ name: "Mustkeom" },
() => { //callback
console.log(this.state.name) // Mustkeom
}
);
So When callback fires, this.state is the updated state.
You can get mutated/updated data in callback.
Hope it help!!