Later we use fir’s alpinejs plugin to enhance the form
submission and receive the re-rendered template as an
event. The event is handled by the
$fir.replace()
helper function which
updates the inner content of the div on which the event
listener is declared. Click the buttons below to see
reactivity in action.
As you can notice, the count value is updated without a
page reload. The server side code remains unchanged.