statelyai/xstate-viz

Add "Context" to Visualiser

cgibson-swyftx opened this issue · 4 comments

It would be good if the visualiser took into consideration the context variables and the guards good make use of these. For example, if we created a loop with a counter. If the visualiser could store the counter in the context and the guards could read it and evaluation the condition, an outcome could be automatically determined.

That way we can more accurately test that the context variables in the visualiser before implementing the diagram in XState.

AFAIK it does already! Are you noticing something different?

Or are you using it from within vscode?

This is with stately.ai. I've hooked up my xstate machine to https://statecharts.io/ which I can visualise a real machine, but stately.ai I was hoping to use as a full demonstration before implementation.

I can see the context on stately.ai/viz but not in the vs code extension. Is this expected?