Closed
Description
Thanks for publishing this great module.
I want to make a derived store from fsm.
const simpleSwitch = fsm('off', {
off: { toggle: 'on' },
on: { toggle: 'off' }
});
$: isOnReactive = $simpleSwitch === 'on' // this works
const isOnDerived = derived(simpleSwitch, $simpleSwitch => $simpleSwitch === 'on') // this doesn't
Please take a look the following repl.
https://svelte.dev/repl/5448ab6468704700ae1c2db736a0ac44?version=3.48.0
Accessing derived store from fsm with $ causes this error.
Cannot read properties of undefined (reading 'unsubscribe')
Please let me know if I am wrong in any way.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels