Redux and the State ADT

ClockIcon98m
reduxRedux
^4.0.1
javascriptJavaScript
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.4
57 people completed
Ian Hofmann-Hicks
By

Ian Hofmann-Hicks

Living to Learn and Learning to Live. Love to learn all the things I don't know and share the stuff I learn in the process.

At a high level Redux is just a dispatching system, sitting atop a finite state machine, driving our application state. It just so happens that the State ADT is good at modeling a finite state machine. It allows us to represent our stateful transactions in discrete, easily composed transactions. We can create complicated stateful transitions by composing many simple transitions into one state transaction. By using the State ADT, we should be able to model all of our application state transitions and provide a single reducer function to Redux that integrates with our state machine model.

We’ll put this theory to the test by building a Memory type game called “Anger The Bunny”. We start of by defining our state transitions using the State ADT, starting with simple, discrete transactions and using them to create the complex transitions typical of any game. Then once we have a majority of our game logic implemented, we will integrate those with Redux.

Ian Hofmann-Hicks
By

Ian Hofmann-Hicks

Living to Learn and Learning to Live. Love to learn all the things I don't know and share the stuff I learn in the process.

Illustration for Introduction to using the State ADT with Redux

Introduction to using the State ADT with Redux

Ian Hofmann-Hicks
Lesson
ClockIcon
2:27