Made a significant architectural change today, switching from Redux to XState for state management. I removed Redux Toolkit, react-redux, and all the associated store files (gameSlice, gameMiddleware, shipSlice, etc.) and replaced them with XState state machines.

I created an apiMachine that handles API calls with proper loading, success, and failure states. There’s also a polling variant that uses a timer machine to automatically retry after a delay. The timer machine itself manages elapsed time and duration for scheduled refetches.

The Status component now uses the new XState-based approach, and the App component is much simpler without the Redux Provider wrapper. Had to fix a deprecated XState pattern too - switching from empty string event transitions to the always property for transient transitions.