New features in ReduxFX 0.1 release

Last week I released version 0.1 of ReduxFX, which added two important features to the library. Now ReduxFX has support for the development of UI-components and it is possible to communicate with external systems. In this post I will give a short introduction into the latter.

Concept of external communication with ReduxFX
The ReduxFX Updater sends commands to the Driver, which communicates with external components. Notifications are sent back via Actions.

At the heart of every ReduxFX application is an event cycle. (You can read more about the event cycle in the README.) The event cycle makes it easy to understand and reason about all changes within an application, but it is not sufficient. Most applications need to communicate with the outside world, e.g. they have to make server requests or store data on the local disk. There are several approaches how an application that follows the principals of functional reactive programming can interact with external systems. The one implemented in ReduxFX is heavily inspired by older versions of elm-lang and redux-loop.

The basic idea is that the Updater does not only create the new state. In addition it can dispatch one or more commands when it receives an Action. You can register so called Drivers with ReduxFX. They will receive all commands dispatched by the Updater and filter the ones they are interested in. To send messages back to the application, a Driver can dispatch Actions to the Updater. In the picture you can see how the Updater interacts with the Driver, which then communicates with the REST service.

Summary

One of the most important new features introduced with ReduxFX 0.1 is the ability to talk to the outside world, which is key for real world applications.

One response to “New features in ReduxFX 0.1 release”

  1. […] mentioned in my previous post, I added two important new features to ReduxFX 0.1. While the previous post focused on the ability […]

More Articles & Posts