Allow promises to be returned in lifecycle hooks