React 19 builds on async transitions

By Paul Krill

React 19, the latest version of Meta’s JavaScript library for rendering user interfaces, is now available in beta. The update introduces features such as async functions in transitions and the ability to access ref as a prop for function components.

The React 19 beta was unveiled April 25. A React 19 beta upgrade guide has been published.

React 19 adds support for using async functions in transitions to handle pending states, forms, errors, and optimistic updates automatically. Functions that use async transitions are called Actions. By building on top of Actions, React 19 introduces useOptimistic to manage optimistic updates and a new hook, React.useActionState, to handle common cases for Actions. Actions also are integrated with new <form> features for react-dom in React 19.

React 19 includes all of the React Server Components features from the Canary channel, meaning libraries that ship with Server Components now can target React 19 as a peer dependency with react-server export condition for use in frameworks that support the Full-stack React Architecture.

Other improvements in React 19:

© Info World