Update Signals#
Demo#
Stuff in signals
Explanation#
This example demonstrates how to update the signals using an SSE event.
event: datastar-merge-signals,
data: signals { HYAAA4BK7IFQE: "2024-05-23T10:33:14.167189214-07:00", existingSignals: "this already exists"}
It will accept anything that is also accepted by the data-signals
attribute.
The removal event looks like this:
event: datastar-remove-signals,
data: paths 12768 existingSignals
Where the paths are .
delimited paths. For nested signals it might look like foo.bar.baz
. Using the Go helpers for example this looks like datastar.RemoveSignals(sse, keysToRemove...)