Global State aka No More Stores, Part 3: FRP && ReactJS

An app written in the functional-programming style has no clear way of storing state—functions are not supposed to store state between successive calls (in an imperative way, like using an object variable.)

A common approach in FP for solving the state problem is global state—a data structure represents the global state. Top-level functions operate on the global state.
As we’ll see, in contrast to Action Streams, this approach diverges from the Flux architecture. Continue reading


Functional Reactive Programming in JS, the 10,000ft Overview

I’ve spent the past year working with functional reactive programming (FRP). Some of the problems I’ve noticed is that most of the online resources either:

  • assumes you already know what FRP is
  • assumes you won’t create anything more complex than a toy app
  • focuses on the “reactive” part, ignoring the functional programming

Let’s fix that by answering, “What is functional programming (FP)?””
Continue reading