Bear with me while I think aloud about this (please comment there, not here!). Goals:
- Minimal boilerplate
- Familiar API
- Preserve Svelte's built-in optimisations
- Support use cases like hot-reloading and custom devtools
Let's start with a single store that is external to the component tree. Our top-level <App>
component connects to it: