Reliable React Survey Flow with XState, Persistence, and SyncReliable React Survey Flow with XState, Persistence, and Sync
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
This is a multi-step survey flow built for reliability. I modelled the whole flow as a state machine with XState, and the React UI simply renders the current state. This keeps the flow safe at every step: you can't continue until your answer is valid, if you close the tab you come back to the same step with your answers saved, and if the connection drops your answers are kept and sent automatically once you're back online.
The result is a flow that is easy to reason about and easy to test, and it ships through CI/CD on GitHub.
I have often worked in B2B environments on projects covered by NDA. This is an illustrative reconstruction of the architecture I designed: the domain and data are fictional, and the patterns and stack reflect the real work.
Tools: TypeScript, React, XState, Node.js, GitHub, CI/CD
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started