Click to Update

Clientside Interactivityframework/ui ↗

Click a button → server returns a value → it appears on screen without reloading.

Live

You have a counter, a vote button, or any UI where a click should update a number or string on screen — without a full page reload. The server owns the state; the browser just displays the latest value.

Put data-fui-rpc on a button and data-fui-rpc-signal on the same element. Add a data-fui-signal span wherever you want the response to appear. The runtime POSTs, parses JSON or text, and pushes the result into every matching signal node.

interactive.OnClick(
    render.Tag("button", nil, render.Text("Like")),
    interactive.Post("/api/like").
        OnSuccess(interactive.SetSignal("like-count")),
)
Live

Click the button — the number updates from the server. No page reload.

0