First conceptualized many decades ago, a finite state machine is a mathematical model of a machine that as the name suggests, can maintain one of a finite number of states. This idea is generating a lot of buzz in the UI community as an effective way to model our component state. Let's take a look at how we can use state machines in our React apps by building a simple toggle machine.
A new addition shipped with React Hooks, useReducer is a powerful function that allows you to manage state with reducers and dispatching changes not too dissimilar from Redux. Learn how it works while building a neat RGB picker.