Update Store directly
Demo
Stuff in store
Explanation
This example demonstrates how to update the store directly from the frontend. This is using a SSE event
event: datastar-signal,
data: store { HYAAA4BK7IFQE: "2024-05-23T10:33:14.167189214-07:00", stuffAlreadyInStore: "this is already in the store"}
It will accept anything that is also accepted by the data-store
attribute.
The deletion event looks like
event: datastar-delete,
data: paths 12768 stuffAlreadyInStore
Where the paths are .
deliminated paths within the store. For a nested store it might look like foo.bar.baz
. Using the Go helpers for example this looks like datastar.DeleteFromStore(sse, keysToDelete...)