Now in beta, React 19 supports using async functions in transitions to handle pending states, errors, forms, and optimistic updates automatically. Credit: Kevin Ku 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: A new API to read resources in render, called use, is introduced. Error reporting has been improved for hydration errors in react-dom. Better support is offered by async scripts; they can be rendered anywhere in a component tree. APIs are offered for loading and preloading browser resources for building experiences not held by inefficient resource loading. Hydration has been improved to account for third-party scripts and browser extensions. Error handling has been improved to remove duplication and provide options for handling caught and uncaught errors. Support is being added for rendering document metadata tags in components natively. <Context> can be rendered as a provider instead of <Context.Provider>. Cleanup functions can be returned from ref callbacks. An initialValue option has been added to useDeferredValue. Related content analysis Beyond the usual suspects: 5 fresh data science tools to try today The mid-month report includes quick tips for easier Python installation, a new VS Code-like IDE just for Python and R users, and five newer data science tools you won't want to miss. By Serdar Yegulalp Jul 12, 2024 2 mins Python Programming Languages Software Development analysis Generative AI won’t fix cloud migration You’ve probably heard how generative AI will solve all cloud migration problems. It’s not that simple. Generative AI could actually make it harder and more costly. By David Linthicum Jul 12, 2024 5 mins Generative AI Artificial Intelligence Cloud Computing news HR professionals trust AI recommendations HireVue survey finds 73% of HR professionals trust AI to make candidate recommendations, while 75% of workers are opposed to AI making hiring decisions. By Paul Krill Jul 11, 2024 3 mins Technology Industry Careers how-to Safety off: Programming in Rust with `unsafe` What does it mean to write unsafe code in Rust, and what can you do (and not do) with the 'unsafe' keyword? The facts may surprise you. By Serdar Yegulalp Jul 11, 2024 8 mins Rust Programming Languages Software Development Resources Videos