Provides all HTTP verbs as $$method(url)
These actions initiate a text/event-stream
Global store inserted into the request as json body or params.
Allows the server to send events to the client.
Interrupted requests will be retried with an added last-event-id header
Can act as a data source for web-components
Datastar Events
- Redirect
- Will redirect the client to the provided URL
- Signal
- Updates the target signal in the client's store (Great for updating state in WebComponents)
- Fragment
- Applies an HTML fragment using the specified merging strategy. The server can provide a CSS selector to target a specific part of the DOM.