State machines

10 articles · all categories

5 articles from 2020 · show all

November 2020

React context without context, using XState – CodeWithSwiz 14, 15

useAuth works without React Context! 🎉 here's how

October 2020

Swap useReducer with XState – CodeWithSwiz 13

In Refactoring a useReducer to XState we talked about a 5 step process to turn a reducer into an XState state machine. Today answers "Ok now what?"

How to write tests for XState – CodeWithSwiz 12

Once you know how to refactor a useReducer to XState, you gotta prove you did it right.

Refactoring a useReducer to XState, pt1 – CodeWithSwiz 11

XState promises to be like useReducer+Context combined and the simplest way to handle complex state in React apps. But can it deliver? On this episode of #CodeWithSwiz, we gave it a shot.

August 2020

When your brain is breaking, try XState