We provide a lot of code samples throughout the book, especially when were building the sample application. We have put the sample application online so that you can download, run, inspect and compare it against your own application. You can view the code at: https://github.com/arturmuller/developing-a-redux-edge.
Author bios
The following authors contributed to this book.
Karl Purkhardt
Karl has been developing software for over 15 years, and started his career in programming by developing a modification for the popular game Half-Life. He has spent the last 10+ years working in web and is the author of redux-decorators. Karl brings a different angle to the book because he works with Redux outside of the React ecosystem.
Artur Muller
Art has been working with the web for over 10 years. Originally a designer, hes a self-taught programmer who loves building products. He has been working with Redux since its creation and has contributed to numerous open source projects including redux-keen and redux-ws.
Johannes Lumpe
Johannes is a full stack web developer and an active contributor to open source projects. He is the creator of redux-history-transitions, helped to build the React Native Playground, and was responsible for porting over the initial Redux Dev Tools to React Native.
Daro Cravero
Dario is a full stack developer with a background in Ruby. Hes involved in a number of open source projects including redux-pouch and bubl. Dario enjoys working on experimental projects and is currently composing a more functional web through one of his open source projects called Panels.
Ezekiel Chentnik
Zeek is a Principal JavaScript Engineer with Northwestern Mutual (Financial Tech) and a CTO at Gufsky. His experience spans global markets (Asia, Europe, Americas) with a passion for large scale e-commerce, financial tech, mobile, progressive web applications, and full stack JavaScript development.
Technical reviewers
We would like to the thank the following technical reviewers for their early feedback and careful critiques.
Mark Erikson is a Redux expert. He wrote the official FAQ page for the Redux docs, and was given commit access to the Redux Github org as a result. Mark has assisted with answering questions and managing the docs.
Erik Rasmussen is known to the Redux community for his react-redux-universal-hot-example repo, for creating the Ducks specification, and for creating the very popular Redux Form library. He has been using Redux since its invention, even before Dans 2015 React Europe talk.
Sven Anders Robbestad is a a front-end consultant currently working for Acando in Norway. He has been working with JavaScript since it was introduced in the mid-90s and has worked for a number of large corporations in Norway since then. He has also given talks on JavaScript and front-end development in Norway and abroad and has published a book on writing ReactJS applications.
Simen Bekkhus has been a front-end developer for 3.5 years, and has worked on projects using Backbone, where he stood for the migration to React and Redux, and in his new job, on an universal React and Redux app. He actively contributed to OSS, especially geared towards Webpack and Redux.
Michael Baldwin is a software engineer currently building an application with Redux at a startup called Notion AI. He is a recent graduate from Grand Valley State University with a Bachelor of Science in Computer Science.
Chapter 1. Why Use Redux?
State is the heart of all rich applications, and as application developers we spend a lot of time managing state within our applications. Without state a web application is nothing more than a static HTML page. If we want to build feature rich web applications we must become proficient at managing state.
Managing state is problematic
As web technologies have matured, web applications have become more complex and feature rich, pushing the boundaries of whats possible. These feature-rich web applications come at a cost, and that cost is complexity. A large piece of that complexity is the management of application state.
Managing this complexity and the extra state required to enable these rich features is hard. Traditionally, we have used two-way data binding to manage state, allowing state to be automatically updated by binding it to the view layer. This is the approach a lot of frameworks took in the early days of web applications, and its still in use today.
This works out fine for smaller applications, but has proven to be difficult as the complexity of web applications have increased, often resulting in opaque systems where data flow and state changes are non-deterministic and hard to debug. As more features are implemented into these troublesome architectures, the issue is compounded, creating a vicious circle.
Part of this complexity is a result of mixing state mutation and asynchronicity, two concepts that are inherently difficult to understand. In Redux circles this problem is referred to as Mentos and Coke. The point being that these concepts can be unpredictable and messy when mixed.