What's the recommended way to document a complex state machine? #4786
Unanswered
HerbCaudill
asked this question in
Q&A
Replies: 1 comment
-
If you're using VSCode, perhaps the XState extension's built-in visualizer would help: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a follow-up to this discussion, in which I worried about the dev-friendliness of my 700-line state machine. @davidkpiano said
I've copy-pasted my file into stately.ai to generate a state chart, and I've linked to that in the code comments.
https://stately.ai/registry/editor/69889811-5f81-4d58-8ef1-f6f3d99fb9ee?machineId=989039f7-631c-4021-a9da-d5f6912dcb03
But that will need to be kept updated as the source code changes, since github sync is a pro-only feature.
What's the current advice (for a non-commercial open-source project) to include a state chart in documentation? To be clear, I wouldn't mind paying for a pro subscription for myself, but I'd be the only one who can see the chart in that case, so it wouldn't solve the problem.
For example, would it be possible to generate a state chart as a static image, as a build step?
Beta Was this translation helpful? Give feedback.
All reactions