Hook<T> typedef
Hook<T> =
void Function(T context, void commit(T newContext))
A hook function used to read the current context
and apply changes to it.
through the commit
function.
Implementation
typedef Hook<T> = void Function(T context, void Function(T newContext) commit);