Doc: Add lifecycle hook documentation.