Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
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

    Transition a Stateful ADT with Outside Input

    javascriptJavaScript

    Without any input from the outside world to drive it, a state machine can be a very boring affair. It becomes even more boring, if we were to create a game that took no input from the outside. By using actions, Redux provides a means to allow the outside world influence and drive the application state based on some payload. In order to demonstrate how we can provide input to our transitions, we will create another transaction that takes an id and transitions the state based on that input.