Lavash.Actions.Action (Lavash v0.4.0-rc.3)

Copy Markdown View Source

An action that transforms state in response to events.

Actions can contain:

  • set - Set a state field to a value using @field syntax
  • run - Execute a function that returns updated assigns
  • effect - Run a side effect
  • submit - Submit a form (async, with on_error branching)
  • navigate - Navigate to a URL on success
  • flash - Show a flash message on success
  • invoke - Invoke an action on a child component