React, etc. Tech Stack

React, Flux, GraphQL, Hack, HHVM...? All of this and more!

RIP Redux: Dan Abramov announces future fetcher API

At JSConf 2018 in Iceland the mastermind behind the Redux JavaScript state management library, Dan Abramovich, announced his replacement for Redux called Future-Fetcher. This follows the trend of developers abandoning the once-popular library due to it's complexity, opting for simpler solutions like MobX.

Dan Abramov was originally part of the Redux team. In 2015 he announced the library at React Europe in Paris. The library is independent of any UI libraries and framework. It is widely used with the React.js UI library as well as it's React Native sister product allowing development of Android and iOS mobile appications.

Redux is often linked to React as Abramov was employed by Facebook soon after the announcement of Redux. Since that time he has been hard at work on the JavaScript world, including significant chunks of work on the major Fiber rewrite of Reach which was released as React 16. In addition to React, Redux can be used together with fully featured frameworks like Angular. You could also use Redux with Vue.js, but most developers opt for Vuex, the solution from the same team as the UI library.

Redux is too complex for the average web app

Redux was a de-facto option for state management in React application in 2016, but has since started to fall out of favor because of excessive boilerplate code needed as well with writing reducers for all the items. The new Future-Fetcher library developed by Abramov aims to bring back simplicity to state management in JavaScript.

While Redux is still a valid concept it is simply too complex for the most commonly built web applications. The terminology derived from functional programming with words like reducers, dispatchers and more also lead to a high learning curve for newcomers. The concepts are clear to those with a Computer Science (CS) educational background, but since the large mass web developers come mostly outside of this arena it is a hindrance.

The Context API is easier to reason about than Redux

With Suspense / Fetch / Context API Dan Abramov pushes for interacting with objects and it's methods directly rather than relying on 3rd party libraries. This might seem unorthodox and even against best practise, it is clear that best practises change all the time.

For example the whole concept of React.js and JSX were initially met with criticism and adoption was abysmal in the first months in 2013. However, fast forward to 2018 and React.js is the popular choice for UI development on the web and elsewhere with React Native and React VR.

Unlike Redux Future Fetcher is not a new library, but rather a new concept that is being rolled into React in the form of the Context API that will simply render a lot of the tasks done by Redux obsolete. Learn more about the technology see the JSConf 2018 Iceland stream and Dan Abramov discussing the Context API and future of React.js in general:

Written by Jorgé on Thursday March 1, 2018

Permalink - Tags: javascript, react, redux, future-fetcher

« Cheap fast VPS: UpCloud rolls out $5+/month plans with SSD - Fetcher / Context APIs and Suspense are like Git for React »