1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Manage Component State with a React Automata State Machine

    reactReact

    In this lesson we are going to use a completely different approach to managing React component internal state than most of React devs are used to. Instead of manually handling the transitions from one state to another we are going to use React Automata which allows us to create a state machine object describing possible states of the component and possible transitions between them and use it in a React component.

    We are going to see an example of React Automata in action while developing a simple traffic light component, but this declarative state approach can be used to create whole React applications as an alternative to other state management solutions.