I have a table that displays contacts and I want to sort the contacts by first name. The contacts array comes from the redux store, which will come then come through the pro
React 16.3 includes a static function getDerivedStateFromProps(nextProps, prevState), which will be invoked after initial mount as well as when it receives new props. See https://reactjs.org/docs/react-component.html#static-getderivedstatefromprops