The Model-View-Update pattern
Unless you’ve never heard of React, you’ve most likely heard of Redux. Redux is a library that follows the Model-View-Update (MVU) pattern. MVU comes from The Elm Architecture. If you don’t know Elm, here is a quote from their documentation:
Elm is a functional language that compiles to JavaScript.
Next, let’s see what the goal behind MVU is.
Goal
The goal of MVU is to simplify the state management of applications. If you’ve built a stateful UI in the past, you probably know it can become hard to manage an application’s state. MVU takes the two-way binding complexity out of the equation and replaces it with a linear one-way flow. It also removes mutations from the picture by replacing them with immutable states, where state updates are moved to pure functions.
Design
The MVU pattern is a unidirectional data flow that routes an action to an update function. An update function...