import {writable, derived} from 'svelte/store'
What is exact different between svelte store and mobx state management library?
There are many differences between the two libraries, but mobx
is definitely a lot more sophisticated (and complicated!). This doesn't mean that mobx should be used as a replacement for svelte/store
as svelte's store library is tightly integrated with svelte, for example:
import { someStore } from "$lib/file";
// you can get the value of stores reactively in .svelte files with $
$: number = $someStore * 5
Conceptually, however, there are many similarities:
derived
readable
in mobx
and it's recommended to use external side effects