Skip to content

Best practices for organizing a big hairy state machine?? #4783

Answered by davidkpiano
HerbCaudill asked this question in Q&A
Discussion options

You must be logged in to vote

This is normal! Sure, the code seems like a lot, but when you visualize it (currently requires a pro subscription): https://github.stately.ai/local-first-web/auth/blob/d2d9b3c9209f869f8c009b528c92d3fc88a38663/packages/auth/src/connection/Connection.ts#L105-L703 - it actually becomes easily understandable. I got the gist of the state machine in under 30 seconds, just looking at the diagram:

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@HerbCaudill
Comment options

@with-heart
Comment options

Answer selected by HerbCaudill
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants