Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/content/docs/en/guides/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ Now, all of your user actions are callable from the `actions.user` object:
- `actions.user.createUser()`


## Function prototype methods

Action functions only support a limited set of JavaScript function prototype methods: `.toString()`, `.valueOf()`, and `.bind()`.
Methods like `.apply()` and `.call()` are not available. This allows you to safely name actions `apply` or `call` without conflicts.


## Handling returned data

Actions return an object containing either `data` with the type-safe return value of your `handler()`, or an `error` with any backend errors. Errors may come from validation errors on the `input` property or thrown errors within the `handler()`.
Expand Down