• React Digest
  • Posts
  • useSyncExternalStore - The underrated React API

useSyncExternalStore - The underrated React API

#373 – September 12, 2022


Understand the differences between spreadsheets and data grids and which problems they solve best so you can make the right choice for your React application. Read more.

this week's favorite

You might have heard of useSyncExternalStore(), a new React 18 hook to subscribe to external data sources. It is often used internally by state management libraries - like Redux - to implement a selector system.

Signals are a way of expressing state that ensure apps stay fast regardless of how complex they get. Signals are based on reactive principles and provide excellent developer ergonomics, with a unique implementation optimized for Virtual DOM.

Gatsby’s data layer is the reason we can get such good build performance. This has been a key part of our architecture since the very beginning, though it’s not always well understood. In this article, I’m going to take you through how the data layer works, how it helps us rebuild sites up to 20x faster than traditional SSGs, and how we’re continuing to make it even more powerful.

The most challenging aspect of developing any application is often managing its state. However, we are often required to manage several pieces of state in our application, such as when data is retrieved from an external server or updated in the app.

We've shipped some quality-of-life improvements to Next.js with 12.3.