Summary
XState is the first state management library in this book to be fundamentally based on mathematical principles. We talked briefly about those principles, as understanding them is very useful for understanding XState. The most important concept is state machines. They are not new in the world of mathematics; they are quite novel, however, when it comes to how we think about global state in mobile apps. Once we had a grasp on the theory and we discovered the very useful XState visualizer, we were ready to do real work. We set up XState in the Funbook app, using best practices described in the XState documentation. We covered the topic of implementing XState as the global state solution for the use case of managing liked images. We looked at fetching data and changing data with XState. I hope you enjoyed it! Now, it’s time to continue our journey to the next outlier in the state management libraries world: Jotai.