Model getDerivedStateFromError without a class.
error.message
function deriveErrorState(prevState, error) { // TODO }