Goodbye waiting to load: React 19 and Forget introduce a new performance standard

Teacher

Professional
Messages
2,677
Reputation
9
Reaction score
629
Points
113
Instagram was the first app to try out the update.

The React team has announced that their new development, the React compiler (internally named "Forget"), is no longer an experimental project. This is a compiler that converts React application code to optimized JavaScript code. This allows you to automatically speed up your applications.

The developers also announced React 19, the next major version of the popular library for creating user interfaces.

React 19 introduces new features such as Actions (formerly Server Actions), Asset Loading, and Web Components support.

Asset Loading allows you to integrate the loading of various resources (styles, fonts, scripts) with the Suspense mechanism. This will allow you to flexibly manage the display of the interface.

And the Document Metadata function allows you to manipulate the rendering of page metadata (for example, meta tags described for SEO). They can be rendered anywhere in the component tree, both on the client and on the server. Previously, metadata could only be set in the root component.

The previous release of React 18 was released in March last year. Its key feature — Server Components-is still experimental.

Forget compiler, which was described in October by a Meta engineer Joe Savona, automatically caches data between renders of React components, avoiding unnecessary re-rendering. This improves performance and makes the code cleaner and clearer by eliminating manual caching.

It is known that Forget is already used in production on Instagram.com. The React development team is expanding to speed up the release of the solution to open access and integration with other Meta services (Facebook, WhatsApp, etc.). However, specific release dates have not yet been announced.

All of these features, including the compiler, Actions, and Document Metadata, were previously under research and were already mentioned by the React team. For example, Forget was first demonstrated back in December 2021 at the React Conf.

As for Server Components — they are not mentioned in the latest announcements, this solution is still experimental. The Next platform.Vercel's js supports it. Official recommendations are to use Server Components in conjunction with frameworks. It is expected that within a year or two, all popular frameworks will implement full support for this technology.

More information about React 19 and the compiler will be announced at the React Conf 2024 conference, which will be held on May 15-16 in Henderson, Nevada, USA. The organizers expect a large influx of visitors and have already introduced a lottery to receive tickets.
 
Top