Image for post
Image for post

Introducing Suspense support and Async Library

It’s been a while since Dan Abramov revealed Suspense, the future vision for async rendering and data fetching in React. Users of React Async have been asking about Suspense support ever since that early announcement. Suspense for Code Splitting was released in October 2018, but Suspense for Data Fetching was postponed until late 2019.

With the year’s end drawing closer, we can finally start preparing for its arrival. That’s why we’ve just released React Async v9 with support for Suspense. Even though it’s marked experimental, you can already start using <Suspense> as a replacement for <Async.Pending> today.

Image for post
Image for post
Wrap your Async components with Suspense.

The way Suspense works is similar to React Async’s pending state, but also very different. While <Async.Pending> has to be a descendant of your Async component, <Suspense> must be an ancestor. That’s because with Suspense, pending promises are thrown, so they traverse up the tree until they are caught by an error boundary, in this case the <Suspense> component. One benefit of this behavior is that you can use a single Suspense boundary for multiple Async components, which wasn’t possible before. …


Web applications have to deal with a lot of asynchronous operations. Loading and updating data is something you have to do over and over again. There’s two common approaches to this: using a global state manager (e.g. Redux) or using setState locally.

Although I’ve been a fan of Redux in the past mostly for its functional style, it tends to be too much for your average application. …


Image for post
Image for post

How Accelerated Mobile Pages and Progressive Web Apps can boost online sales

In the world of e-commerce, customers are becoming increasingly mobile. In The Netherlands, 50% of consumers is shopping on their mobile phone. Among those under 35 years of age mobile purchases is at 65%. Numbers for searching and browsing for a potential purchase is over 70% overall.

Converting these visitors into customers is a delicate task. Consumers are still hesitant to make mobile purchases. The challenge lies in optimizing the mobile user experience. Some shops have tried to improve user experience using a native mobile app. These apps are installed through the Apple or Google app store. However, installation rates for mobile apps are decreasing.

About

Gert Hengeveld

Enabling Component-Driven Development with @ChromaUI and @Storybookjs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store