3 ms·
> React + MobX is the most productive I've ever been while working on user interfaces I loved using React/Inferno + MobX too. Right now I find myself being mu
by pier25 6y ago
> React + MobX is the most productive I've ever been while working on user interfaces
I loved using React/Inferno + MobX too.
Right now I find myself being much more productive with Svelte which already includes a reactive primitive out of the box (writable/readable) that can be used with classes too.
- brundolf 6y agoI haven't tried Svelte, but I've heard good things. I am curious how it handles reactivity beyond just the UI; the way you can use MobX's computed values for any arbitrary memoization layer is one of my favorite features.
- alserio 6y agoIn Svelte you can define a reactive statement (or block) with the $ label syntax. It's semantically the same of a MobX's computed value, expressed succinctly `$: v = expr` where expr will be rerun when and only if its dependencies change.
- pier25 6y agoSadly, that's only in .svelte files though.
- pier25 6y agoAFAIK Svelte doesn't have memoization because, unlike React, it does't really need it. Svelte tracks reactive dependencies at compile time so that only the necessary parts of the DOM are updated when some state changes. Svelte has a derived reactive store similar to a computed value in Mobx: https://svelte.dev/docs#derived https://svelte.dev/docs#derived