Your app is already a state machine. I’ll help you draw it.
I’m David Khourshid. I created XState and I teach engineering teams to model tricky UI, workflows and AI agents as statecharts, so the bugs show up on a diagram instead of in production.
Available worldwide, remote or on-site. Booking goes straight to my inbox.
Engineers at these companies ship with XState
Why do teams call me?
Because the logic got away from them. It usually looks like one of these.
The spinner and the error message are both showing
Four booleans can make sixteen states. Your designer drew five. A statechart makes the other eleven impossible instead of “unlikely”.
useEffect is doing everything
Effects that fire twice, race each other and drift out of sync. Model the events first and effects get one obvious home. My “Goodbye, useEffect” talk has 500K+ views for a reason.
The AI agent went off-script
If the rules live in a prompt, nobody can review them. Put the flow in a state machine, let the model handle the fuzzy parts, and require approval where it matters.
How can we work together?
Three parallel regions: plenty of teams are in all three at once.
Team workshops
Private, hands-on training on XState, statecharts, React state and AI agents. Remote from $9,500, on-site from $20,000.
See curricula and pricesKeynotes
For engineering summits, all-hands and conferences. 73 recorded talks since 2015. Corporate keynotes from $15,000.
See talks and feesAdvisory
Architecture reviews, retainers and expert hours for teams with gnarly stateful products. From $750 an hour.
See advisory optionsOn your own budget? Public workshops, courses and 1:1 calls start at $99.
What engineers say about XState
“We’ve been using XState for our new payments product. Shout out to the team that is making designing complex front-end flows a dream.”
“We use XState to implement business workflows as statecharts. The visualizer helps us collaborate more closely with customers, the ability to externalize workflows as JSON configuration makes complex workflow changes surprisingly simple to roll out, and test case generation makes it easier than ever to move forward with confidence.”
“XState naturally separates the logic and makes it simple to mock out API calls, so it’s easier to test the code and organize it!”
Who is David Khourshid?
David Khourshid (@DavidKPiano) is a software engineer in Orlando, Florida, the creator of XState and the founder of Stately. Before Stately he worked at Microsoft on Visual Studio Live Share (2017 to 2021).
XState had 30,324 GitHub stars and 3,057,973 npm downloads in the week of October 10 to 16, 2026 (npm). His five Frontend Masters courses have been watched for 37,790 hours, and his 119 recorded talks and streams have about 1.36 million YouTube views.
And yes, the “Piano” is real. He was a pianist before he was a programmer.
Where is he speaking next?
- CityJS Athens
Oct 22, 2026. Workshop: Graph Engineering: Making State-Machine Powered Agents - React Summit US & AI Coding Summit NYC
Nov 16–19, 2026. Cloning Full-Stack Apps with AI: What It Really Takes - React Day Berlin
2026. Goodbye Slop; Welcome Determinism
Which talks should you watch first?
These are the ones teams send me after watching. All 119 recordings have transcripts and chapters.
-
Goodbye, useEffect
BeJS, 2022. 29:58, 516.1K views -
Goodbye, useState
G2i, 2025. 23:58, 50.8K views -
Goodbye Slop; Welcome Determinism
Agent Conf 2026 (Warsaw). 21:17, 97.1K views -
Stop Drawing Pointless Arrows: Taming Complexity with Diagrams
YOW! Australia 2024. 45:37, 4.3K views -
Infinitely Better UIs with Finite Automata
React Rally 2017. 25:33, 56.8K views