Open SimeonC opened 2 years ago
Currently, the editor does not support multiple targets per transition. This is something we need to figure out to bring the editor up to XState feature parity.
We can support in
, though - will add that as a separate issue.
Added to Linear, this is something we want to support: https://linear.app/statelyai/issue/STA-1290/support-for-multiple-targets
Just bumping this with a +1 if that’s allowed 😅
Some more feedback from someone who's new to xstate and learns the overall technology by writing the code and using the visual editor side-by-side:
Having the multiple target values not be reflected in the editor UI led me to the (wrong) conclusion that having multiple target values wasn't allowed i.e. a xstate design decision. Based on this conclusion I started completely refactoring my state machine. 🤦
I just ran into this issue as well, where my machine had target: [...]
like OPs but the visualizer rewrote it in VS Code to a single target: '...'
.
Editing a machine using the VSCode editor with the following state node config will end up with a broken machine as the
in
specifier and the multiple targets get stripped out.