David Khourshid

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.

david David Khourshid
David Khourshid. Creator of XState, founder of Stately.

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 prices

Keynotes

For engineering summits, all-hands and conferences. 73 recorded talks since 2015. Corporate keynotes from $15,000.

See talks and fees

Advisory

Architecture reviews, retainers and expert hours for teams with gnarly stateful products. From $750 an hour.

See advisory options

On 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.

Which talks should you watch first?

These are the ones teams send me after watching. All 119 recordings have transcripts and chapters.