Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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.

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

kenkunzcommented, Sep 8, 2022

Apologies for not merging #9 sooner – I had intended to do this a while ago, but was busy with a work project and it fell off my radar. Just merged it and published 1.2.0 to NPM. Thank you @astanet for reporting and @morungos for the PR!

astanetcommented, Jun 7, 2022

@morungos Thank you for your detailed research and great insights. I could not have understood it in that depth. I am glad that I was not wrong, but rather that I was able to clarify this issue. I don’t have the ability to provide a fix, but I hope this module will be even better and further accelerate development at Svelte.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding the differences is the key to deriving a correct and efficient FSM and an FSM-based control circuit. There are three major differences...
Read more >
Deriving FSM-based tests using $a,b-\text{faults}$ for Logic ...
The main problem for deriving an FSM-based test suite is the size of an FSM for real digital circuits, and thus, test engineers...
Read more >
Tutorials - Deriving the FSM controller - mc_rtc
Deriving the FSM controller. A common recipe to get more out of the FSM is to derive the FSM controller, this allows to:...
Read more >
Finite State Machine - Digital Logic Design (EEE 241)
Derive the simplified flip-flop input and output equations. 6. Draw the logic diagram. Page 8. State Transition Diagrams. • ...
Read more >
Deriving a state table for a finite state machine
Hi, I am currently trying to solve this: The assignment is to create a state table of the finite state machine depicted above....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found