State callbacks in React
This a very quick post to highlight a feature in React that is frequently overlooked (at least by me 😊). The setState(), replaceState(), and forceUpdate() methods of React.Component all take an optional callback function that is called when a state “transaction” is completed. Note…