-
Hi, I'm new to xstate. I'm trying to incorporate xstate into my home automation system and running some tests. The idea is to make a general machine for the house status, which spawns machines for the resident statuses. I'm running some test for the general architecture. Works ok: I can setup the parent machine, which spawns the residents with some configuration parameters. I can send events to the main machine and to the child machines. The final step in my tests is the persistence. And that is where it fails: If I persist and restore without spawning childs everything is ok, the machine restores in its peristed state. (but I cannot find out where this error starts from). Any clues how to get my machine persisting? childmachine:
parentmachine:
Invocation:
Persisting (after sending some events):
Stored state (string):
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Found my issue: childs should be spawned by reference and not inline. |
Beta Was this translation helpful? Give feedback.
Found my issue: childs should be spawned by reference and not inline.