Closed xnought closed 1 year ago
Instead of calling
register(model) const count = anywritable("count")
Create the store beforehand and simply link with the view
const count = writable(0); const dispose = linkanywidget(count, model, "count")
This way you can more easily define the svelte store beforehand in a separate file.
downside is less readable code if you're not familiar with svelte. The current method feels like a more concise syntax.
called it syncAnywidget
syncAnywidget
Instead of calling
Create the store beforehand and simply link with the view
This way you can more easily define the svelte store beforehand in a separate file.
downside is less readable code if you're not familiar with svelte. The current method feels like a more concise syntax.