To explain the example: that just listens to the global state store and redraws when it changes. You could do the same with a `use` helper that registers/unregisters observables/stores
Here's an example from https://github.com/coracle-social/nonboard using svelte stores:
```
unsubscribe = state.subscribe(s => m.redraw())
```
Mithril uses a virtual dom, so this isn't much worse than react to begin with. To avoid re-calculating sub-trees (since rendering happens starting from the top) you might use `onbeforeupdate`, or `m.render` to isolate stuff more manually. I haven't gone that deep yet, but I'm sure it's possible.
Discussion
No replies yet.