At the moment, the documentation doesn't say much about how to use the pre and post hooks. This like requirements (a pre hook requires the inner type to be set) or the function signatures required are not documented.
What's also missing IMHO is documentation as to when exactly the hooks are called.
At least I couldn't find it :)