{"componentChunkName":"component---src-templates-blog-js","path":"/blog/2022/03/29/react-v18.html","result":{"data":{"markdownRemark":{"html":"<p>React 18 is now available on npm!</p>\n<p>In our last post, we shared step-by-step instructions for <a href=\"https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">upgrading your app to React 18</a>. In this post, we’ll give an overview of what’s new in React 18, and what it means for the future.</p>\n<p>Our latest major version includes out-of-the-box improvements like automatic batching, new APIs like startTransition, and streaming server-side rendering with support for Suspense.</p>\n<p>Many of the features in React 18 are built on top of our new concurrent renderer, a behind-the-scenes change that unlocks powerful new capabilities. Concurrent React is opt-in — it’s only enabled when you use a concurrent feature — but we think it will have a big impact on the way people build applications.</p>\n<p>We’ve spent years researching and developing support for concurrency in React, and we’ve taken extra care to provide a gradual adoption path for existing users. Last summer, <a href=\"https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">we formed the React 18 Working Group</a> to gather feedback from experts in the community and ensure a smooth upgrade experience for the entire React ecosystem.</p>\n<p>In case you missed it, we shared a lot of this vision at React Conf 2021:</p>\n<ul>\n<li>In <a href=\"https://www.youtube.com/watch?v=FZ0cG47msEk&#x26;list=PLNG_1j3cPCaZZ7etkzWA7JfdmKWT0pMsa\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">the keynote</a>, we explain how React 18 fits into our mission to make it easy for developers to build great user experiences</li>\n<li><a href=\"https://twitter.com/shrutikapoor08\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Shruti Kapoor</a> <a href=\"https://www.youtube.com/watch?v=ytudH8je5ko&#x26;list=PLNG_1j3cPCaZZ7etkzWA7JfdmKWT0pMsa&#x26;index=2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">demonstrated how to use the new features in React 18</a></li>\n<li><a href=\"https://twitter.com/shaundai\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Shaundai Person</a> gave us an overview of <a href=\"https://www.youtube.com/watch?v=pj5N-Khihgc&#x26;list=PLNG_1j3cPCaZZ7etkzWA7JfdmKWT0pMsa&#x26;index=3\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">streaming server rendering with Suspense</a></li>\n</ul>\n<p>Below is a full overview of what to expect in this release, starting with Concurrent Rendering.</p>\n<p><em>Note for React Native users: React 18 will ship in React Native with the New React Native Architecture. For more information, see the <a href=\"https://www.youtube.com/watch?v=FZ0cG47msEk&#x26;t=1530s\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">React Conf keynote here</a>.</em></p>\n<h2 id=\"what-is-concurrent-react\"><a href=\"#what-is-concurrent-react\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is Concurrent React? </h2>\n<p>The most important addition in React 18 is something we hope you never have to think about: concurrency. We think this is largely true for application developers, though the story may be a bit more complicated for library maintainers.</p>\n<p>Concurrency is not a feature, per se. It’s a new behind-the-scenes mechanism that enables React to prepare multiple versions of your UI at the same time. You can think of concurrency as an implementation detail — it’s valuable because of the features that it unlocks. React uses sophisticated techniques in its internal implementation, like priority queues and multiple buffering. But you won’t see those concepts anywhere in our public APIs.</p>\n<p>When we design APIs, we try to hide implementation details from developers. As a React developer, you focus on <em>what</em> you want the user experience to look like, and React handles <em>how</em> to deliver that experience. So we don’t expect React developers to know how concurrency works under the hood.</p>\n<p>However, Concurrent React is more important than a typical implementation detail — it’s a foundational update to React’s core rendering model. So while it’s not super important to know how concurrency works, it may be worth knowing what it is at a high level.</p>\n<p>A key property of Concurrent React is that rendering is interruptible. When you first upgrade to React 18, before adding any concurrent features, updates are rendered the same as in previous versions of React — in a single, uninterrupted, synchronous transaction. With synchronous rendering, once an update starts rendering, nothing can interrupt it until the user can see the result on screen.</p>\n<p>In a concurrent render, this is not always the case. React may start rendering an update, pause in the middle, then continue later. It may even abandon an in-progress render altogether. React guarantees that the UI will appear consistent even if a render is interrupted. To do this, it waits to perform DOM mutations until the end, once the entire tree has been evaluated. With this capability, React can prepare new screens in the background without blocking the main thread. This means the UI can respond immediately to user input even if it’s in the middle of a large rendering task, creating a fluid user experience.</p>\n<p>Another example is reusable state. Concurrent React can remove sections of the UI from the screen, then add them back later while reusing the previous state. For example, when a user tabs away from a screen and back, React should be able to restore the previous screen in the same state it was in before. In an upcoming minor, we’re planning to add a new component called <code class=\"gatsby-code-text\">&lt;Offscreen></code> that implements this pattern. Similarly, you’ll be able to use Offscreen to prepare new UI in the background so that it’s ready before the user reveals it.</p>\n<p>Concurrent rendering is a powerful new tool in React and most of our new features are built to take advantage of it, including Suspense, transitions, and streaming server rendering. But React 18 is just the beginning of what we aim to build on this new foundation.</p>\n<h2 id=\"gradually-adopting-concurrent-features\"><a href=\"#gradually-adopting-concurrent-features\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Gradually Adopting Concurrent Features </h2>\n<p>Technically, concurrent rendering is a breaking change. Because concurrent rendering is interruptible, components behave slightly differently when it is enabled.</p>\n<p>In our testing, we’ve upgraded thousands of components to React 18. What we’ve found is that nearly all existing components “just work” with concurrent rendering, without any changes. However, some of them may require some additional migration effort. Although the changes are usually small, you’ll still have the ability to make them at your own pace. The new rendering behavior in React 18 is <strong>only enabled in the parts of your app that use new features.</strong></p>\n<p>The overall upgrade strategy is to get your application running on React 18 without breaking existing code. Then you can gradually start adding concurrent features at your own pace. You can use <a href=\"/docs/strict-mode.html\"><code class=\"gatsby-code-text\">&lt;StrictMode></code></a> to help surface concurrency-related bugs during development. Strict Mode doesn’t affect production behavior, but during development it will log extra warnings and double-invoke functions that are expected to be idempotent. It won’t catch everything, but it’s effective at preventing the most common types of mistakes.</p>\n<p>After you upgrade to React 18, you’ll be able to start using concurrent features immediately. For example, you can use startTransition to navigate between screens without blocking user input. Or useDeferredValue to throttle expensive re-renders.</p>\n<p>However, long term, we expect the main way you’ll add concurrency to your app is by using a concurrent-enabled library or framework. In most cases, you won’t interact with concurrent APIs directly. For example, instead of developers calling startTransition whenever they navigate to a new screen, router libraries will automatically wrap navigations in startTransition.</p>\n<p>It may take some time for libraries to upgrade to be concurrent compatible. We’ve provided new APIs to make it easier for libraries to take advantage of concurrent features. In the meantime, please be patient with maintainers as we work to gradually migrate the React ecosystem.</p>\n<p>For more info, see our previous post: <a href=\"https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">How to upgrade to React 18</a>.</p>\n<h2 id=\"suspense-in-data-frameworks\"><a href=\"#suspense-in-data-frameworks\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Suspense in Data Frameworks </h2>\n<p>In React 18, you can start using Suspense for data fetching in opinionated frameworks like Relay, Next.js, Hydrogen, or Remix. Ad hoc data fetching with Suspense is technically possible, but still not recommended as a general strategy.</p>\n<p>In the future, we may expose additional primitives that could make it easier to access your data with Suspense, perhaps without the use of an opinionated framework. However, Suspense works best when it’s deeply integrated into your application’s architecture: your router, your data layer, and your server rendering environment. So even long term, we expect that libraries and frameworks will play a crucial role in the React ecosystem.</p>\n<p>As in previous versions of React, you can also use Suspense for code splitting on the client with React.lazy. But our vision for Suspense has always been about much more than loading code — the goal is to extend support for Suspense so that eventually, the same declarative Suspense fallback can handle any asynchronous operation (loading code, data, images, etc).</p>\n<h2 id=\"server-components-is-still-in-development\"><a href=\"#server-components-is-still-in-development\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Server Components is Still in Development </h2>\n<p><a href=\"https://reactjs.org/blog/2020/12/21/data-fetching-with-react-server-components.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><strong>Server Components</strong></a> is an upcoming feature that allows developers to build apps that span the server and client, combining the rich interactivity of client-side apps with the improved performance of traditional server rendering. Server Components is not inherently coupled to Concurrent React, but it’s designed to work best with concurrent features like Suspense and streaming server rendering.</p>\n<p>Server Components is still experimental, but we expect to release an initial version in a minor 18.x release. In the meantime, we’re working with frameworks like Next.js, Hydrogen, and Remix to advance the proposal and get it ready for broad adoption.</p>\n<h2 id=\"whats-new-in-react-18\"><a href=\"#whats-new-in-react-18\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What’s New in React 18 </h2>\n<h3 id=\"new-feature-automatic-batching\"><a href=\"#new-feature-automatic-batching\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>New Feature: Automatic Batching </h3>\n<p>Batching is when React groups multiple state updates into a single re-render for better performance. Without automatic batching, we only batched updates inside React event handlers. Updates inside of promises, setTimeout, native event handlers, or any other event were not batched in React by default. With automatic batching, these updates will be batched automatically:</p>\n<div class=\"gatsby-highlight\" data-language=\"jsx\"><pre class=\"gatsby-code-jsx\"><code class=\"gatsby-code-jsx\"><span class=\"token comment\">// Before: only React events were batched.</span>\n<span class=\"token function\">setTimeout</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">{</span>\n  <span class=\"token function\">setCount</span><span class=\"token punctuation\">(</span><span class=\"token parameter\">c</span> <span class=\"token operator\">=></span> c <span class=\"token operator\">+</span> <span class=\"token number\">1</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n  <span class=\"token function\">setFlag</span><span class=\"token punctuation\">(</span><span class=\"token parameter\">f</span> <span class=\"token operator\">=></span> <span class=\"token operator\">!</span>f<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n  <span class=\"token comment\">// React will render twice, once for each state update (no batching)</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span> <span class=\"token number\">1000</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// After: updates inside of timeouts, promises,</span>\n<span class=\"token comment\">// native event handlers or any other event are batched.</span>\n<span class=\"token function\">setTimeout</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">{</span>\n  <span class=\"token function\">setCount</span><span class=\"token punctuation\">(</span><span class=\"token parameter\">c</span> <span class=\"token operator\">=></span> c <span class=\"token operator\">+</span> <span class=\"token number\">1</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n  <span class=\"token function\">setFlag</span><span class=\"token punctuation\">(</span><span class=\"token parameter\">f</span> <span class=\"token operator\">=></span> <span class=\"token operator\">!</span>f<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n  <span class=\"token comment\">// React will only re-render once at the end (that's batching!)</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span> <span class=\"token number\">1000</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>For more info, see this post for <a href=\"https://github.com/reactwg/react-18/discussions/21\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Automatic batching for fewer renders in React 18</a>.</p>\n<h3 id=\"new-feature-transitions\"><a href=\"#new-feature-transitions\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>New Feature: Transitions </h3>\n<p>A transition is a new concept in React to distinguish between urgent and non-urgent updates.</p>\n<ul>\n<li><strong>Urgent updates</strong> reflect direct interaction, like typing, clicking, pressing, and so on.</li>\n<li><strong>Transition updates</strong> transition the UI from one view to another.</li>\n</ul>\n<p>Urgent updates like typing, clicking, or pressing, need immediate response to match our intuitions about how physical objects behave. Otherwise they feel “wrong”. However, transitions are different because the user doesn’t expect to see every intermediate value on screen.</p>\n<p>For example, when you select a filter in a dropdown, you expect the filter button itself to respond immediately when you click. However, the actual results may transition separately. A small delay would be imperceptible and often expected. And if you change the filter again before the results are done rendering, you only care to see the latest results.</p>\n<p>Typically, for the best user experience, a single user input should result in both an urgent update and a non-urgent one. You can use startTransition API inside an input event to inform React which updates are urgent and which are “transitions”:</p>\n<div class=\"gatsby-highlight\" data-language=\"jsx\"><pre class=\"gatsby-code-jsx\"><code class=\"gatsby-code-jsx\"><span class=\"token keyword\">import</span> <span class=\"token punctuation\">{</span>startTransition<span class=\"token punctuation\">}</span> <span class=\"token keyword\">from</span> <span class=\"token string\">'react'</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Urgent: Show what was typed</span>\n<span class=\"token function\">setInputValue</span><span class=\"token punctuation\">(</span>input<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Mark any state updates inside as transitions</span>\n<span class=\"token function\">startTransition</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// Transition: Show the results</span>\n  <span class=\"token function\">setSearchQuery</span><span class=\"token punctuation\">(</span>input<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>Updates wrapped in startTransition are handled as non-urgent and will be interrupted if more urgent updates like clicks or key presses come in. If a transition gets interrupted by the user (for example, by typing multiple characters in a row), React will throw out the stale rendering work that wasn’t finished and render only the latest update.</p>\n<ul>\n<li><code class=\"gatsby-code-text\">useTransition</code>: a hook to start transitions, including a value to track the pending state.</li>\n<li><code class=\"gatsby-code-text\">startTransition</code>: a method to start transitions when the hook cannot be used.</li>\n</ul>\n<p>Transitions will opt in to concurrent rendering, which allows the update to be interrupted. If the content re-suspends, transitions also tell React to continue showing the current content while rendering the transition content in the background (see the <a href=\"https://github.com/reactjs/rfcs/blob/main/text/0213-suspense-in-react-18.md\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Suspense RFC</a> for more info).</p>\n<p><a href=\"/docs/react-api.html#transitions\">See docs for transitions here</a>.</p>\n<h3 id=\"new-suspense-features\"><a href=\"#new-suspense-features\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>New Suspense Features </h3>\n<p>Suspense lets you declaratively specify the loading state for a part of the component tree if it’s not yet ready to be displayed:</p>\n<div class=\"gatsby-highlight\" data-language=\"jsx\"><pre class=\"gatsby-code-jsx\"><code class=\"gatsby-code-jsx\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span><span class=\"token class-name\">Suspense</span></span> <span class=\"token attr-name\">fallback</span><span class=\"token script language-javascript\"><span class=\"token script-punctuation punctuation\">=</span><span class=\"token punctuation\">{</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span><span class=\"token class-name\">Spinner</span></span> <span class=\"token punctuation\">/></span></span><span class=\"token punctuation\">}</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">\n  </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span><span class=\"token class-name\">Comments</span></span> <span class=\"token punctuation\">/></span></span><span class=\"token plain-text\">\n</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span><span class=\"token class-name\">Suspense</span></span><span class=\"token punctuation\">></span></span></code></pre></div>\n<p>Suspense makes the “UI loading state” a first-class declarative concept in the React programming model. This lets us build higher-level features on top of it.</p>\n<p>We introduced a limited version of Suspense several years ago. However, the only supported use case was code splitting with React.lazy, and it wasn’t supported at all when rendering on the server.</p>\n<p>In React 18, we’ve added support for Suspense on the server and expanded its capabilities using concurrent rendering features.</p>\n<p>Suspense in React 18 works best when combined with the transition API. If you suspend during a transition, React will prevent already-visible content from being replaced by a fallback. Instead, React will delay the render until enough data has loaded to prevent a bad loading state.</p>\n<p>For more, see the RFC for <a href=\"https://github.com/reactjs/rfcs/blob/main/text/0213-suspense-in-react-18.md\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Suspense in React 18</a>.</p>\n<h3 id=\"new-client-and-server-rendering-apis\"><a href=\"#new-client-and-server-rendering-apis\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>New Client and Server Rendering APIs </h3>\n<p>In this release we took the opportunity to redesign the APIs we expose for rendering on the client and server. These changes allow users to continue using the old APIs in React 17 mode while they upgrade to the new APIs in React 18.</p>\n<h4 id=\"react-dom-client\"><a href=\"#react-dom-client\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React DOM Client </h4>\n<p>These new APIs are now exported from <code class=\"gatsby-code-text\">react-dom/client</code>:</p>\n<ul>\n<li><code class=\"gatsby-code-text\">createRoot</code>: New method to create a root to <code class=\"gatsby-code-text\">render</code> or <code class=\"gatsby-code-text\">unmount</code>. Use it instead of <code class=\"gatsby-code-text\">ReactDOM.render</code>. New features in React 18 don’t work without it.</li>\n<li><code class=\"gatsby-code-text\">hydrateRoot</code>: New method to hydrate a server rendered application. Use it instead of  <code class=\"gatsby-code-text\">ReactDOM.hydrate</code> in conjunction with the new React DOM Server APIs. New features in React 18 don’t work without it.</li>\n</ul>\n<p>Both <code class=\"gatsby-code-text\">createRoot</code> and <code class=\"gatsby-code-text\">hydrateRoot</code> accept a new option called <code class=\"gatsby-code-text\">onRecoverableError</code> in case you want to be notified when React recovers from errors during rendering or hydration for logging. By default, React will use <a href=\"https://developer.mozilla.org/en-US/docs/Web/API/reportError\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><code class=\"gatsby-code-text\">reportError</code></a>, or <code class=\"gatsby-code-text\">console.error</code> in the older browsers.</p>\n<p><a href=\"/docs/react-dom-client.html\">See docs for React DOM Client here</a>.</p>\n<h4 id=\"react-dom-server\"><a href=\"#react-dom-server\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React DOM Server </h4>\n<p>These new APIs are now exported from <code class=\"gatsby-code-text\">react-dom/server</code> and have full support for streaming Suspense on the server:</p>\n<ul>\n<li><code class=\"gatsby-code-text\">renderToPipeableStream</code>: for streaming in Node environments.</li>\n<li><code class=\"gatsby-code-text\">renderToReadableStream</code>: for modern edge runtime environments, such as Deno and Cloudflare workers.</li>\n</ul>\n<p>The existing <code class=\"gatsby-code-text\">renderToString</code> method keeps working but is discouraged.</p>\n<p><a href=\"/docs/react-dom-server.html\">See docs for React DOM Server here</a>.</p>\n<h3 id=\"new-strict-mode-behaviors\"><a href=\"#new-strict-mode-behaviors\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>New Strict Mode Behaviors </h3>\n<p>In the future, we’d like to add a feature that allows React to add and remove sections of the UI while preserving state. For example, when a user tabs away from a screen and back, React should be able to immediately show the previous screen. To do this, React would unmount and remount trees using the same component state as before.</p>\n<p>This feature will give React apps better performance out-of-the-box, but requires components to be resilient to effects being mounted and destroyed multiple times. Most effects will work without any changes, but some effects assume they are only mounted or destroyed once.</p>\n<p>To help surface these issues, React 18 introduces a new development-only check to Strict Mode. This new check will automatically unmount and remount every component, whenever a component mounts for the first time, restoring the previous state on the second mount.</p>\n<p>Before this change, React would mount the component and create the effects:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"gatsby-code-text\"><code class=\"gatsby-code-text\">* React mounts the component.\n  * Layout effects are created.\n  * Effects are created.</code></pre></div>\n<p>With Strict Mode in React 18, React will simulate unmounting and remounting the component in development mode:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"gatsby-code-text\"><code class=\"gatsby-code-text\">* React mounts the component.\n  * Layout effects are created.\n  * Effects are created.\n* React simulates unmounting the component.\n  * Layout effects are destroyed.\n  * Effects are destroyed.\n* React simulates mounting the component with the previous state.\n  * Layout effects are created.\n  * Effects are created.</code></pre></div>\n<p><a href=\"/docs/strict-mode.html#ensuring-reusable-state\">See docs for ensuring reusable state here</a>.</p>\n<h3 id=\"new-hooks\"><a href=\"#new-hooks\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>New Hooks </h3>\n<h4 id=\"useid\"><a href=\"#useid\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>useId </h4>\n<p><code class=\"gatsby-code-text\">useId</code> is a new hook for generating unique IDs on both the client and server, while avoiding hydration mismatches. It is primarily useful for component libraries integrating with accessibility APIs that require unique IDs. This solves an issue that already exists in React 17 and below, but it’s even more important in React 18 because of how the new streaming server renderer delivers HTML out-of-order. <a href=\"/docs/hooks-reference.html#useid\">See docs here</a>.</p>\n<blockquote>\n<p>Note</p>\n<p><code class=\"gatsby-code-text\">useId</code> is <strong>not</strong> for generating <a href=\"/docs/lists-and-keys.html#keys\">keys in a list</a>. Keys should be generated from your data.</p>\n</blockquote>\n<h4 id=\"usetransition\"><a href=\"#usetransition\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>useTransition </h4>\n<p><code class=\"gatsby-code-text\">useTransition</code> and <code class=\"gatsby-code-text\">startTransition</code> let you mark some state updates as not urgent. Other state updates are considered urgent by default. React will allow urgent state updates (for example, updating a text input) to interrupt non-urgent state updates (for example, rendering a list of search results). <a href=\"/docs/hooks-reference.html#usetransition\">See docs here</a></p>\n<h4 id=\"usedeferredvalue\"><a href=\"#usedeferredvalue\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>useDeferredValue </h4>\n<p><code class=\"gatsby-code-text\">useDeferredValue</code> lets you defer re-rendering a non-urgent part of the tree. It is similar to debouncing, but has a few advantages compared to it. There is no fixed time delay, so React will attempt the deferred render right after the first render is reflected on the screen. The deferred render is interruptible and doesn’t block user input. <a href=\"/docs/hooks-reference.html#usedeferredvalue\">See docs here</a>.</p>\n<h4 id=\"usesyncexternalstore\"><a href=\"#usesyncexternalstore\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>useSyncExternalStore </h4>\n<p><code class=\"gatsby-code-text\">useSyncExternalStore</code> is a new hook that allows external stores to support concurrent reads by forcing updates to the store to be synchronous. It removes the need for useEffect when implementing subscriptions to external data sources, and is recommended for any library that integrates with state external to React. <a href=\"/docs/hooks-reference.html#usesyncexternalstore\">See docs here</a>.</p>\n<blockquote>\n<p>Note</p>\n<p><code class=\"gatsby-code-text\">useSyncExternalStore</code> is intended to be used by libraries, not application code.</p>\n</blockquote>\n<h4 id=\"useinsertioneffect\"><a href=\"#useinsertioneffect\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>useInsertionEffect </h4>\n<p><code class=\"gatsby-code-text\">useInsertionEffect</code> is a new hook that allows CSS-in-JS libraries to address performance issues of injecting styles in render. Unless you’ve already built a CSS-in-JS library we don’t expect you to ever use this. This hook will run after the DOM is mutated, but before layout effects read the new layout. This solves an issue that already exists in React 17 and below, but is even more important in React 18 because React yields to the browser during concurrent rendering, giving it a chance to recalculate layout. <a href=\"/docs/hooks-reference.html#useinsertioneffect\">See docs here</a>.</p>\n<blockquote>\n<p>Note</p>\n<p><code class=\"gatsby-code-text\">useInsertionEffect</code> is intended to be used by libraries, not application code.</p>\n</blockquote>\n<h2 id=\"how-to-upgrade\"><a href=\"#how-to-upgrade\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How to Upgrade </h2>\n<p>See <a href=\"https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">How to Upgrade to React 18</a> for step-by-step instructions and a full list of breaking and notable changes.</p>\n<h2 id=\"changelog\"><a href=\"#changelog\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Changelog </h2>\n<h3 id=\"react\"><a href=\"#react\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React </h3>\n<ul>\n<li>Add <code class=\"gatsby-code-text\">useTransition</code> and <code class=\"gatsby-code-text\">useDeferredValue</code> to separate urgent updates from transitions. (<a href=\"https://github.com/facebook/react/pull/10426\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#10426</a>, <a href=\"https://github.com/facebook/react/pull/10715\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#10715</a>, <a href=\"https://github.com/facebook/react/pull/15593\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15593</a>, <a href=\"https://github.com/facebook/react/pull/15272\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15272</a>, <a href=\"https://github.com/facebook/react/pull/15578\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15578</a>, <a href=\"https://github.com/facebook/react/pull/15769\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15769</a>, <a href=\"https://github.com/facebook/react/pull/17058\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#17058</a>, <a href=\"https://github.com/facebook/react/pull/18796\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#18796</a>, <a href=\"https://github.com/facebook/react/pull/19121\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19121</a>, <a href=\"https://github.com/facebook/react/pull/19703\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19703</a>, <a href=\"https://github.com/facebook/react/pull/19719\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19719</a>, <a href=\"https://github.com/facebook/react/pull/19724\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19724</a>, <a href=\"https://github.com/facebook/react/pull/20672\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20672</a>, <a href=\"https://github.com/facebook/react/pull/20976\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20976</a> by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>, <a href=\"https://github.com/lunaruan\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@lunaruan</a>, <a href=\"https://github.com/rickhanlonii\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@rickhanlonii</a>, and <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">useId</code> for generating unique IDs. (<a href=\"https://github.com/facebook/react/pull/17322\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#17322</a>, <a href=\"https://github.com/facebook/react/pull/18576\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#18576</a>, <a href=\"https://github.com/facebook/react/pull/22644\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22644</a>, <a href=\"https://github.com/facebook/react/pull/22672\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22672</a>, <a href=\"https://github.com/facebook/react/pull/21260\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21260</a> by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>, <a href=\"https://github.com/lunaruan\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@lunaruan</a>, and <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">useSyncExternalStore</code> to help external store libraries integrate with React. (<a href=\"https://github.com/facebook/react/pull/15022\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15022</a>, <a href=\"https://github.com/facebook/react/pull/18000\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#18000</a>, <a href=\"https://github.com/facebook/react/pull/18771\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#18771</a>, <a href=\"https://github.com/facebook/react/pull/22211\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22211</a>, <a href=\"https://github.com/facebook/react/pull/22292\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22292</a>, <a href=\"https://github.com/facebook/react/pull/22239\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22239</a>, <a href=\"https://github.com/facebook/react/pull/22347\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22347</a>, <a href=\"https://github.com/facebook/react/pull/23150\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23150</a> by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>, <a href=\"https://github.com/bvaughn\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bvaughn</a>, and <a href=\"https://github.com/drarmstr\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@drarmstr</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">startTransition</code> as a version of <code class=\"gatsby-code-text\">useTransition</code> without pending feedback. (<a href=\"https://github.com/facebook/react/pull/19696\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19696</a>  by <a href=\"https://github.com/rickhanlonii\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@rickhanlonii</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">useInsertionEffect</code> for CSS-in-JS libraries. (<a href=\"https://github.com/facebook/react/pull/21913\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21913</a>  by <a href=\"https://github.com/rickhanlonii\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@rickhanlonii</a>)</li>\n<li>Make Suspense remount layout effects when content reappears.  (<a href=\"https://github.com/facebook/react/pull/19322\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19322</a>, <a href=\"https://github.com/facebook/react/pull/19374\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19374</a>, <a href=\"https://github.com/facebook/react/pull/19523\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19523</a>, <a href=\"https://github.com/facebook/react/pull/20625\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20625</a>, <a href=\"https://github.com/facebook/react/pull/21079\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21079</a> by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>, <a href=\"https://github.com/bvaughn\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bvaughn</a>, and <a href=\"https://github.com/lunaruan\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@lunaruan</a>)</li>\n<li>Make <code class=\"gatsby-code-text\">&lt;StrictMode></code> re-run effects to check for restorable state. (<a href=\"https://github.com/facebook/react/pull/19523\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#19523</a> , <a href=\"https://github.com/facebook/react/pull/21418\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21418</a>  by <a href=\"https://github.com/bvaughn\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bvaughn</a> and <a href=\"https://github.com/lunaruan\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@lunaruan</a>)</li>\n<li>Assume Symbols are always available. (<a href=\"https://github.com/facebook/react/pull/23348\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23348</a>  by <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Remove <code class=\"gatsby-code-text\">object-assign</code> polyfill. (<a href=\"https://github.com/facebook/react/pull/23351\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23351</a>  by <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Remove unsupported <code class=\"gatsby-code-text\">unstable_changedBits</code> API.  (<a href=\"https://github.com/facebook/react/pull/20953\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20953</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n<li>Allow components to render undefined. (<a href=\"https://github.com/facebook/react/pull/21869\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21869</a>  by <a href=\"https://github.com/rickhanlonii\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@rickhanlonii</a>)</li>\n<li>Flush <code class=\"gatsby-code-text\">useEffect</code> resulting from discrete events like clicks synchronously. (<a href=\"https://github.com/facebook/react/pull/21150\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21150</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n<li>Suspense <code class=\"gatsby-code-text\">fallback={undefined}</code> now behaves the same as <code class=\"gatsby-code-text\">null</code> and isn’t ignored. (<a href=\"https://github.com/facebook/react/pull/21854\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21854</a>  by <a href=\"https://github.com/rickhanlonii\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@rickhanlonii</a>)</li>\n<li>Consider all <code class=\"gatsby-code-text\">lazy()</code> resolving to the same component equivalent. (<a href=\"https://github.com/facebook/react/pull/20357\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20357</a>  by <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Don’t patch console during first render. (<a href=\"https://github.com/facebook/react/pull/22308\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22308</a>  by <a href=\"https://github.com/lunaruan\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@lunaruan</a>)</li>\n<li>Improve memory usage. (<a href=\"https://github.com/facebook/react/pull/21039\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21039</a>  by <a href=\"https://github.com/bgirard\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bgirard</a>)</li>\n<li>Improve messages if string coercion throws (Temporal.*, Symbol, etc.) (<a href=\"https://github.com/facebook/react/pull/22064\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22064</a>  by <a href=\"https://github.com/justingrant\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@justingrant</a>)</li>\n<li>Use <code class=\"gatsby-code-text\">setImmediate</code> when available over <code class=\"gatsby-code-text\">MessageChannel</code>. (<a href=\"https://github.com/facebook/react/pull/20834\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20834</a>  by <a href=\"https://github.com/gaearon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gaearon</a>)</li>\n<li>Fix context failing to propagate inside suspended trees. (<a href=\"https://github.com/facebook/react/pull/23095\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23095</a>  by <a href=\"https://github.com/gaearon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gaearon</a>)</li>\n<li>Fix <code class=\"gatsby-code-text\">useReducer</code> observing incorrect props by removing the eager bailout mechanism. (<a href=\"https://github.com/facebook/react/pull/22445\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22445</a>  by <a href=\"https://github.com/josephsavona\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@josephsavona</a>)</li>\n<li>Fix <code class=\"gatsby-code-text\">setState</code> being ignored in Safari when appending iframes. (<a href=\"https://github.com/facebook/react/pull/23111\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23111</a>  by <a href=\"https://github.com/gaearon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gaearon</a>)</li>\n<li>Fix a crash when rendering <code class=\"gatsby-code-text\">ZonedDateTime</code> in the tree. (<a href=\"https://github.com/facebook/react/pull/20617\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20617</a>  by <a href=\"https://github.com/dimaqq\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@dimaqq</a>)</li>\n<li>Fix a crash when document is set to <code class=\"gatsby-code-text\">null</code> in tests. (<a href=\"https://github.com/facebook/react/pull/22695\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22695</a>  by <a href=\"https://github.com/SimenB\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@SimenB</a>)</li>\n<li>Fix <code class=\"gatsby-code-text\">onLoad</code> not triggering when concurrent features are on. (<a href=\"https://github.com/facebook/react/pull/23316\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23316</a>  by <a href=\"https://github.com/gnoff\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gnoff</a>)</li>\n<li>Fix a warning when a selector returns <code class=\"gatsby-code-text\">NaN</code>.  (<a href=\"https://github.com/facebook/react/pull/23333\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23333</a>  by <a href=\"https://github.com/hachibeeDI\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@hachibeeDI</a>)</li>\n<li>Fix a crash when document is set to <code class=\"gatsby-code-text\">null</code> in tests. (<a href=\"https://github.com/facebook/react/pull/22695\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22695</a> by <a href=\"https://github.com/SimenB\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@SimenB</a>)</li>\n<li>Fix the generated license header. (<a href=\"https://github.com/facebook/react/pull/23004\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23004</a>  by <a href=\"https://github.com/vitaliemiron\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@vitaliemiron</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">package.json</code> as one of the entry points. (<a href=\"https://github.com/facebook/react/pull/22954\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22954</a>  by <a href=\"https://github.com/Jack-Works\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@Jack</a>)</li>\n<li>Allow suspending outside a Suspense boundary. (<a href=\"https://github.com/facebook/react/pull/23267\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23267</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n<li>Log a recoverable error whenever hydration fails. (<a href=\"https://github.com/facebook/react/pull/23319\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23319</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n</ul>\n<h3 id=\"react-dom\"><a href=\"#react-dom\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React DOM </h3>\n<ul>\n<li>Add <code class=\"gatsby-code-text\">createRoot</code> and <code class=\"gatsby-code-text\">hydrateRoot</code>. (<a href=\"https://github.com/facebook/react/pull/10239\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#10239</a>, <a href=\"https://github.com/facebook/react/pull/11225\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#11225</a>, <a href=\"https://github.com/facebook/react/pull/12117\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#12117</a>, <a href=\"https://github.com/facebook/react/pull/13732\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#13732</a>, <a href=\"https://github.com/facebook/react/pull/15502\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15502</a>, <a href=\"https://github.com/facebook/react/pull/15532\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15532</a>, <a href=\"https://github.com/facebook/react/pull/17035\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#17035</a>, <a href=\"https://github.com/facebook/react/pull/17165\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#17165</a>, <a href=\"https://github.com/facebook/react/pull/20669\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20669</a>, <a href=\"https://github.com/facebook/react/pull/20748\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20748</a>, <a href=\"https://github.com/facebook/react/pull/20888\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20888</a>, <a href=\"https://github.com/facebook/react/pull/21072\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21072</a>, <a href=\"https://github.com/facebook/react/pull/21417\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21417</a>, <a href=\"https://github.com/facebook/react/pull/21652\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21652</a>, <a href=\"https://github.com/facebook/react/pull/21687\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21687</a>, <a href=\"https://github.com/facebook/react/pull/23207\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23207</a>, <a href=\"https://github.com/facebook/react/pull/23385\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23385</a> by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>, <a href=\"https://github.com/bvaughn\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bvaughn</a>, <a href=\"https://github.com/gaearon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gaearon</a>, <a href=\"https://github.com/lunaruan\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@lunaruan</a>, <a href=\"https://github.com/rickhanlonii\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@rickhanlonii</a>, <a href=\"https://github.com/trueadm\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@trueadm</a>, and <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Add selective hydration. (<a href=\"https://github.com/facebook/react/pull/14717\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#14717</a>, <a href=\"https://github.com/facebook/react/pull/14884\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#14884</a>, <a href=\"https://github.com/facebook/react/pull/16725\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#16725</a>, <a href=\"https://github.com/facebook/react/pull/16880\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#16880</a>, <a href=\"https://github.com/facebook/react/pull/17004\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#17004</a>, <a href=\"https://github.com/facebook/react/pull/22416\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22416</a>, <a href=\"https://github.com/facebook/react/pull/22629\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22629</a>, <a href=\"https://github.com/facebook/react/pull/22448\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22448</a>, <a href=\"https://github.com/facebook/react/pull/22856\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22856</a>, <a href=\"https://github.com/facebook/react/pull/23176\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23176</a> by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>, <a href=\"https://github.com/gaearon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gaearon</a>, <a href=\"https://github.com/salazarm\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@salazarm</a>, and <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">aria-description</code> to the list of known ARIA attributes. (<a href=\"https://github.com/facebook/react/pull/22142\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22142</a>  by <a href=\"https://github.com/mahyareb\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@mahyareb</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">onResize</code> event to video elements. (<a href=\"https://github.com/facebook/react/pull/21973\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21973</a>  by <a href=\"https://github.com/rileyjshaw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@rileyjshaw</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">imageSizes</code> and <code class=\"gatsby-code-text\">imageSrcSet</code> to known props. (<a href=\"https://github.com/facebook/react/pull/22550\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22550</a>  by <a href=\"https://github.com/eps1lon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@eps1lon</a>)</li>\n<li>Allow non-string <code class=\"gatsby-code-text\">&lt;option></code> children if <code class=\"gatsby-code-text\">value</code> is provided.  (<a href=\"https://github.com/facebook/react/pull/21431\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21431</a>  by <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Fix <code class=\"gatsby-code-text\">aspectRatio</code> style not being applied. (<a href=\"https://github.com/facebook/react/pull/21100\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21100</a>  by <a href=\"https://github.com/gaearon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gaearon</a>)</li>\n<li>Warn if <code class=\"gatsby-code-text\">renderSubtreeIntoContainer</code> is called. (<a href=\"https://github.com/facebook/react/pull/23355\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23355</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n</ul>\n<h3 id=\"react-dom-server-1\"><a href=\"#react-dom-server-1\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React DOM Server </h3>\n<ul>\n<li>Add the new streaming renderer. (<a href=\"https://github.com/facebook/react/pull/14144\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#14144</a>, <a href=\"https://github.com/facebook/react/pull/20970\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#20970</a>, <a href=\"https://github.com/facebook/react/pull/21056\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21056</a>, <a href=\"https://github.com/facebook/react/pull/21255\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21255</a>, <a href=\"https://github.com/facebook/react/pull/21200\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21200</a>, <a href=\"https://github.com/facebook/react/pull/21257\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21257</a>, <a href=\"https://github.com/facebook/react/pull/21276\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21276</a>, <a href=\"https://github.com/facebook/react/pull/22443\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22443</a>, <a href=\"https://github.com/facebook/react/pull/22450\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22450</a>, <a href=\"https://github.com/facebook/react/pull/23247\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23247</a>, <a href=\"https://github.com/facebook/react/pull/24025\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#24025</a>, <a href=\"https://github.com/facebook/react/pull/24030\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#24030</a> by <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Fix context providers in SSR when handling multiple requests. (<a href=\"https://github.com/facebook/react/pull/23171\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23171</a>  by <a href=\"https://github.com/frandiox\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@frandiox</a>)</li>\n<li>Revert to client render on text mismatch. (<a href=\"https://github.com/facebook/react/pull/23354\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23354</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n<li>Deprecate <code class=\"gatsby-code-text\">renderToNodeStream</code>. (<a href=\"https://github.com/facebook/react/pull/23359\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23359</a>  by <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n<li>Fix a spurious error log in the new server renderer. (<a href=\"https://github.com/facebook/react/pull/24043\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#24043</a>  by <a href=\"https://github.com/eps1lon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@eps1lon</a>)</li>\n<li>Fix a bug in the new server renderer. (<a href=\"https://github.com/facebook/react/pull/22617\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22617</a>  by <a href=\"https://github.com/shuding\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@shuding</a>)</li>\n<li>Ignore function and symbol values inside custom elements on the server. (<a href=\"https://github.com/facebook/react/pull/21157\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21157</a>  by <a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a>)</li>\n</ul>\n<h3 id=\"react-dom-test-utils\"><a href=\"#react-dom-test-utils\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React DOM Test Utils </h3>\n<ul>\n<li>Throw when <code class=\"gatsby-code-text\">act</code> is used in production. (<a href=\"https://github.com/facebook/react/pull/21686\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21686</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n<li>Support disabling spurious act warnings with <code class=\"gatsby-code-text\">global.IS_REACT_ACT_ENVIRONMENT</code>. (<a href=\"https://github.com/facebook/react/pull/22561\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22561</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n<li>Expand act warning to cover all APIs that might schedule React work. (<a href=\"https://github.com/facebook/react/pull/22607\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22607</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n<li>Make <code class=\"gatsby-code-text\">act</code> batch updates. (<a href=\"https://github.com/facebook/react/pull/21797\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#21797</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n<li>Remove warning for dangling passive effects. (<a href=\"https://github.com/facebook/react/pull/22609\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22609</a>  by <a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a>)</li>\n</ul>\n<h3 id=\"react-refresh\"><a href=\"#react-refresh\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React Refresh </h3>\n<ul>\n<li>Track late-mounted roots in Fast Refresh. (<a href=\"https://github.com/facebook/react/pull/22740\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22740</a>  by <a href=\"https://github.com/anc95\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@anc95</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">exports</code> field to <code class=\"gatsby-code-text\">package.json</code>. (<a href=\"https://github.com/facebook/react/pull/23087\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23087</a>  by <a href=\"https://github.com/otakustay\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@otakustay</a>)</li>\n</ul>\n<h3 id=\"server-components-experimental\"><a href=\"#server-components-experimental\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Server Components (Experimental) </h3>\n<ul>\n<li>Add Server Context support. (<a href=\"https://github.com/facebook/react/pull/23244\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#23244</a>  by <a href=\"https://github.com/salazarm\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@salazarm</a>)</li>\n<li>Add <code class=\"gatsby-code-text\">lazy</code> support. (<a href=\"https://github.com/facebook/react/pull/24068\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#24068</a>  by <a href=\"https://github.com/gnoff\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gnoff</a>)</li>\n<li>Update webpack plugin for webpack 5 (<a href=\"https://github.com/facebook/react/pull/22739\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22739</a>  by <a href=\"https://github.com/michenly\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@michenly</a>)</li>\n<li>Fix a mistake in the Node loader. (<a href=\"https://github.com/facebook/react/pull/22537\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22537</a>  by <a href=\"https://github.com/btea\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@btea</a>)</li>\n<li>Use <code class=\"gatsby-code-text\">globalThis</code> instead of <code class=\"gatsby-code-text\">window</code> for edge environments. (<a href=\"https://github.com/facebook/react/pull/22777\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#22777</a>  by <a href=\"https://github.com/huozhi\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@huozhi</a>)</li>\n</ul>","excerpt":"React 18 is now available on npm! In our last post, we shared step-by-step instructions for upgrading your app to React 18. In this post, we’ll give an overview of what’s new in React 18, and what it means for the future. Our latest major version includes out-of-the-box improvements like automatic batching, new APIs like startTransition, and streaming server-side rendering with support for Suspense. Many of the features in React 18 are built on top of our new concurrent renderer, a behind-the…","frontmatter":{"title":"React v18.0","next":null,"prev":null,"author":[{"frontmatter":{"name":"The React Team","url":"https://reactjs.org/community/team.html"}}]},"fields":{"date":"March 29, 2022","path":"content/blog/2022-03-29-react-v18.md","slug":"/blog/2022/03/29/react-v18.html"}},"allMarkdownRemark":{"edges":[{"node":{"frontmatter":{"title":"React Labs: What We've Been Working On – June 2022"},"fields":{"slug":"/blog/2022/06/15/react-labs-what-we-have-been-working-on-june-2022.html"}}},{"node":{"frontmatter":{"title":"React v18.0"},"fields":{"slug":"/blog/2022/03/29/react-v18.html"}}},{"node":{"frontmatter":{"title":"How to Upgrade to React 18"},"fields":{"slug":"/blog/2022/03/08/react-18-upgrade-guide.html"}}},{"node":{"frontmatter":{"title":"React Conf 2021 Recap"},"fields":{"slug":"/blog/2021/12/17/react-conf-2021-recap.html"}}},{"node":{"frontmatter":{"title":"The Plan for React 18"},"fields":{"slug":"/blog/2021/06/08/the-plan-for-react-18.html"}}},{"node":{"frontmatter":{"title":"Introducing Zero-Bundle-Size React Server Components"},"fields":{"slug":"/blog/2020/12/21/data-fetching-with-react-server-components.html"}}},{"node":{"frontmatter":{"title":"React v17.0"},"fields":{"slug":"/blog/2020/10/20/react-v17.html"}}},{"node":{"frontmatter":{"title":"Introducing the New JSX Transform"},"fields":{"slug":"/blog/2020/09/22/introducing-the-new-jsx-transform.html"}}},{"node":{"frontmatter":{"title":"React v17.0 Release Candidate: No New Features"},"fields":{"slug":"/blog/2020/08/10/react-v17-rc.html"}}},{"node":{"frontmatter":{"title":"React v16.13.0"},"fields":{"slug":"/blog/2020/02/26/react-v16.13.0.html"}}}]}},"pageContext":{"slug":"/blog/2022/03/29/react-v18.html"}},"staticQueryHashes":[]}