Skip to content

Commit

Permalink
Improve lifecycle docs
Browse files Browse the repository at this point in the history
Make it clear that [before|after]Execution hooks are called for each
step/code execution.
  • Loading branch information
tonyhb committed Jan 21, 2025
1 parent dbf519f commit d737e62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/docs/reference/middleware/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ The `init()` function can return functions for two separate lifecycles to hook i
Called after the function has finished memoizing state (running over previously-seen code).
</Property>
<Property name="beforeExecution" type="function">
Called before the function starts to execute (running code seen for the first time).
Called before any step or code executes.
</Property>
<Property name="afterExecution" type="function">
Called after the function has finished executing.
Called after any step or code has finished executing.
</Property>
<Property name="transformOutput" type="function">
Called after the function has finished executing and before the response is sent back to Inngest. This is where you can modify the output.
Expand Down

0 comments on commit d737e62

Please sign in to comment.