Unlike SCXML, XState distinguishes between cond (condition) and in (query (parallel) state). While xstate-viz shows the names of cond guards, in guards are not visualized at all. In combination with always events, this leads to the weird impression that any of two transitions could be triggered.
As a workaround, if you examine closely, you'll notice that when hovering over the transitions, the follow-up is only highlighted if their guard is fulfilled, but I still miss any hint that there is a guard in the first place.
See also #265.
Expected Result
in guards should be visualized in a similar fashion as cond guards.
Actual Result
in guards are not visualized at all.
Reproduction
check it out in viz
For comparison, I specified the START transition twice, one via in, the other via cond. The cond-based transition is labelled intuitively, but the in-based transition looks like it has no guard at all.
Description
Unlike SCXML, XState distinguishes between
cond
(condition) andin
(query (parallel) state). While xstate-viz shows the names ofcond
guards,in
guards are not visualized at all. In combination withalways
events, this leads to the weird impression that any of two transitions could be triggered. As a workaround, if you examine closely, you'll notice that when hovering over the transitions, the follow-up is only highlighted if their guard is fulfilled, but I still miss any hint that there is a guard in the first place. See also #265.Expected Result
in
guards should be visualized in a similar fashion ascond
guards.Actual Result
in
guards are not visualized at all.Reproduction
check it out in viz For comparison, I specified the START transition twice, one via
in
, the other viacond
. Thecond
-based transition is labelled intuitively, but thein
-based transition looks like it has no guard at all.Additional context
N/A