Facebook’s React has changed the way we think about web
applications and user interface development. Due to its design, you
can use it beyond web. A feature known as the Virtual DOM enables
In this chapter we’ll go through some of the basic ideas behind the
library so you understand React a little better before moving on.
What is React?
components. This model of thinking fits user interfaces well.
Depending on your background it might feel alien at first. You will
have to think very carefully about the concept of state and where it
Because state management is a difficult problem, a variety of
solutions have appeared. In this book, we’ll start by managing state ourselves and then push it to a Flux implementation known as Alt.
There are also implementations available for several other
alternatives, such as Redux, MobX, and Cerebral.
React is pragmatic in the sense that it contains a set of escape hatches.
If the React model doesn’t work for you, it is still possible to revert
back to something lower level. For instance, there are hooks that can
be used to wrap older logic that relies on the DOM. This breaks the
abstraction and ties your code to a specific environment, but
sometimes that’s the pragmatic thing to do.