`preUpdate` and `postUpdate` callback hooks
This obviates the need to override the Component update()
method in order to run code on every state update (for instance for logging state changes). Overriding update()
potentially required explicit overrides for every component in the tree, whereas the hooks work gracefully with cascading updates. Example usage:
get config() {
return {
// ...
hooks: {
postUpdate: () => localStorage.setItem(`latestFoo`, this.state.foo),
},
};
}