React19 : What can we expect?

Prashant Jha
2 min readFeb 25, 2024

React team have been working on next improvement in the library. The new release will be introduced on May 15–16 on new version launch of React 19.

Below are the major things in this release.

React Compiler

React compiler which powers instagram.com will be released. React can sometimes re-renders too much on state change. There are manual ways to handle it via memoization. We can use useCallback, useMemo, memo but it clutters up our code, easy to go wrong and it takes some extra work to keep up to date.

react forget is code name for the compiler that is built by meta to automatically memoize react hooks and components. This lets devs write code without manually memoize while acheiving same performance as memoized and even better in some cases.

This compiler simplifies developers experience and optimize app by default by memoizing the react hooks and components under the hood.

Actions

For server side rendering we used Next.js and and to make hydration faster we used React Server Components. This broader collection of features will be combined into “Actions”. Action allows you to pass a function to DOM elements.

Action function can be sync and async both and it can be used on both client and server side.

By default action will be submitted within a transition keep the current page active while performing the action.

useOptimistic

we can now use useOptimistic hook for optimistic state update. We can apply temporary update. That will be reverted once final state commits.

Document Metadata

We’ll have built in support for <title>, <meta> and <link> tag anywhere in component tree. These will work in same way in CSR, SSR or RSC. This will provide built in support of features available in React Helmet. So React Helmet tag will be eliminated with this.

Asset loading

Now we’ll have Suspense for <style>, <link> and <script> tags as well so react can determine whether the content in these tags are ready to be displayed.

not a big release on this new version launch but it’ll surely make a developers life easier than before.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Prashant Jha
Prashant Jha

Written by Prashant Jha

interested in Code, Books, Philosophy, Poems

No responses yet

Write a response