React, etc. Tech Stack

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

Fetcher / Context APIs and Suspense are like Git for React

Talking at JSConf 2018 in Iceland, Dan Abramov gave a talk on the future of React. One most notable announcement was the addition of the Context API to the universally popular JavaScript UI library.

As a library React has always focused on being a great tool for building user interfaces for the web. In fact it has been so great that it now spans everything from mobile devices using React Native as well as VR applications with React VR, A framework for building VR apps using React.

Unlike frameworks like Angular or libraries like Vue.js that come with a first party state management library (Vuex), React has been very decoupled from state management. It does come with a built in state management tools, but since the announcement of the Flux architecture there has been a plethora of tools for managing application state with JavaScript. Some popular options are Redux, MobX and Satchel.

For most of 2017 React received few feature updates as the team focused on the rewrite dubbed Fiber. This was eventually released as React 16.0 which is mosty API compatible with the 15.x series. Since that time the team has accelerated adding new features, with fragments landing in React 16.2 for example. Now the team is back on track and is taking a novel approach to state management.

The upcoming Context API that will be added to React will not be a Redux killer per se, but with it developers will be able to do more capable state management with React without adding more tools. It adds version control like concepts to manage state when managing asynchronous operations:

React with Suspense

This was demoed in the presentation at JSConf Iceland, but details on when the features will arrive are still unknown. In the Pull Request for Suspense there is discussion on landing this in React 16.3, but it is not certain yet.

Written by Jorgé on Thursday March 1, 2018

Permalink -

« RIP Redux: Dan Abramov announces future fetcher API - Time Slice and Suspense Features Coming to React.js »