Rajat Explains
1 min readFeb 23, 2019

--

Hey Sagar bhaiya, I completely agree with what you are saying. In most cases, the callbacks are not necessary and they should be avoided. But yeah as I mentioned, if I want the updated state just after I have updated it, callbacks become important. I also don’t do this
this.setState((prevState) => ({
books: prevState.books + 1
}));

It for sure kills the readibility :)

--

--

Rajat Explains
Rajat Explains

Written by Rajat Explains

Software Engineer at Uber | ex-Microsoft

No responses yet