diff --git a/example_project/assets/svelte/StoreCounter.svelte b/example_project/assets/svelte/StoreCounter.svelte new file mode 100644 index 0000000..7b61baf --- /dev/null +++ b/example_project/assets/svelte/StoreCounter.svelte @@ -0,0 +1,44 @@ + + +
+ Two instances of the same component share a single
+ writable
+ store. Clicking +1 in either card instantly updates both — no props, no events, no server round-trip.
+
+ Last synced value: + + <%= if @server_value != nil do %> + {@server_value} + <% else %> + not yet synced + <% end %> + +
++ Sync count: {@sync_count} +
+