I really like the look of the composition API in Vue 3 though I have not used it yet, it gives me hope for addressing some of the issues you mention. I wonder does Svelte have anything comparable?
- Reactivity API - yes, with $: labels
- Lifecycle hooks - yes, similar to the ones mentioned
- Dependency injection - not sure what it is exactly as I'm not familiar with Vue, but I don't think Svelte has a concept like this
[1]: https://vuejs.org/guide/extras/composition-api-faq.html#what...
It's poorly named (holdover from earlier version of vue when svelte didnt exist and react didn't have contexts), but it's basically React/Svelte context API for passing data to children further down the tree instead of passing them through props or through a separate state management solution (e.g. vuex/redux).
There's some nuance, but roughly:
- getContext = provide
- setContext = inject