Today we’re happy to introduce another pro feature for our Stately Studio subscribers; Version History. With this feature, you can save versions of your work as you go and refer back to them in the future.
6 posts tagged with “tutorial”
View all tagsReact developers often need to share state between components. While the useMachine(...)
hook provides a convenient way to represent local state as a state machine, it’s not very feasible for shared or global state. Thankfully, @xstate/react
’s createActorContext(machine)
function, released in @xstate/react@3.1.0
, is a convenient way to share state machines globally in any React application.
A few weeks ago we uploaded a new video to the Stately YouTube channel showing how you can build basic video player functionality using XState and Stately tools. You can watch the video below or use the chapter links to jump to the chapter you want to watch.
Modelling using statecharts changed my career as a dev. Of all the state management solutions I’ve tried, it feels the most complete, logical and robust. Even if you don’t use them in your app’s code, statecharts let you break down complex features into states, events, services, actions and guards.
XState and TypeScript are a match made in heaven. TypeScript gives you type safety, and XState gives you logical safety. Together, they give you confidence that your code will do what you expect.
However, we’ve been hearing from the community for some time that the experience of using TypeScript with XState needed improving.
Today's your lucky day. XState’s TypeScript experience just got an enormous upgrade.
TL;DR: Bad booleans represent state. Good booleans are derived from state.