Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 1.58 KB

redux.md

File metadata and controls

25 lines (14 loc) · 1.58 KB

Redux

Why

While React.js gives us stateful components, we need another isomorphic tool to manage state across our entire single-page-applications. Managing state in a declarative framework like React is critical, and easy to get wrong. How can we minimize side effects, while maximizing testability and reproducibility? How can we visualize the changes we are pushing to our state?

What

Redux is a tiny (2kb) library used most commonly with React single-page-applications, to manage its state. It has an excellent browser dev tool that shows you the actions you make, and the state mutations that are caused by them.

Redux uses a single source of truth, called "the store", which is an immutable object tree. The only way to change the data is by emitting "actions", which describe what you want to do. These actions use "reducers" to perform the mutations to the state. All of these concepts are rooted in functional programming, and therefore highly unit testable.

How

Our TELUS isomorphic starter kit defines our standard UI application, with React and Redux at its heart. The FAQ has a lot of information about how we use Redux.

Who

Front-end developers

References