Skip to main content Skip to footer

What's New in React 18

The React team recently announced that the initial preview for React 18 is live, and work has started for the React 18 release. This is an Alpha release and not suitable for production, but testing and feedback are encouraged.

Now is the time library authors can try React 18 and provide input and direction before its official release. A primary goal is to prepare the ecosystem for a smooth and graduation adoption of React 18 by using existing applications and libraries.

GrapeCity Provides Premium JavaScript Solutions

Including SpreadJS and Wijmo

Check them out today!

React 18 Good News

The upgrades provided with React 18 do not require significant code changes! We may need to repeat this and embrace the beauty of the good news. Almost all of the benefits of the upgrade do not require code changes.

React 18 Highlights | UX, Internal Architecture, and More

React 18 includes out-of-the-box improvements (automatic batching), new APIs (startTransition), and a new streaming server renderer with built-in support (React.lazy). React 18 also includes architectural improvements for React server-side rendering (SSR) performance.

New Opt-In Mechanism?

Concurrent Rendering (the new opt-in mechanism) and React prepare multiple versions of the UI simultaneously. This change is primarily behind the scenes, but it unlocks new possibilities to improve your app's actual and perceived performance.

Since concurrency in React 18 is opt-in, there are no significant out-of-the-box breaking changes to component behavior. You can upgrade to React 18 with minimal or no changes to your application code, with a level of effort compared to a typical major React release. According to the working team at React, many users will be able to upgrade within a single afternoon.

The New Root API

This ReactDOM.render() is now called the Legacy Root API. It works the same way as React 17. You can still use this but know that it will be deprecated eventually.

New Root API

new root api

Very similar to the previous Root API. With React 18 use ReactDOM.createRoot.

The React 18 Root API change means:

  • The hydrate method and render callback are gone
  • There is now a createRoot option

When you switch to the New Root API, you automatically get the new out-of-the-box improvements that come with React 18! This change is all you need to do to upgrade the client to React 18. If you only use React client-side, you are finished.

startTransition API

The new API helps with webpage responsiveness. The startTransition can not only keep the current webpage responsive and able to perform heavy non-blocking UI updates at the same time.

Think of it when a user types in a search box, the input value is immediately updated, while the research results may help wait a few milliseconds. The API provides a way to differentiate between quick and delayed updates.

The delayed updates are referred to as Transition Updates.
Rich UI or non-urgent updates we can wrap with the startTransition API as:

start transition api

Server-Side Rending Improvements

React 18 offers full support for Suspense; if you remember, React 16 had support but not full support. Suspense is a functionality set that allows for waiting for data to resolve before a state transition (delayed transitions), reducing UI clashes while data loads (placeholder throttling), and coordinating the appearance of a set of components by streaming them in order (SuspenseList).

With React 18, we can break React components into smaller chucks using .

Timeline

There is no specific release date scheduled, but we should expect something over the next few months.

  • Library Alpha: Available June 2021
  • Public Beta: June 2021 (plus a few months)
  • Release Candidate (RC): Several weeks post Beta Release
  • General Availability: Several weeks post RC

Alpha, Beta, Gamma?

Alpha

The initial preview. Most features are stable, but work is underway to finalize the new API, including useMutableSource, useOpaqueIdentifier, and stylesheets.

Beta

Once React 18 is feature complete, the React 18 Beta will be released. The Beta version includes all of the breaking changes and new features to the final release. Beta is also a time for a larger community (outside of the library authors) to start trying React 18, provide feedback, and report any remaining issues.

RC

When React 18 is fully feature complete and confident in the stability of the release, it becomes a release candidate.

Stable

Then React 18 can release!

React and GrapeCity

GrapeCity is committed to continuing support for all versions of React. Check back for our official communica. Numerous GrapeCity products supported React from the beginning. We will continue to test and upgrade our products to meet the newest editions. These products include:

  • ActiveReportsJS: Our JavaScript reporting solution for Web Applications
  • DataViewsJS: Our complete data presentation and datagrid platform
  • SpreadJS: Our JavaScript Spreadsheet With over 450 Excel Functions Wijmo: Our dynamic JavaScript UI components for enterprise applications

GrapeCity Provides Premium JavaScript Solutions

Including SpreadJS and Wijmo

Check them out today!

Michelle Sebek

Product Marketing Manager
comments powered by Disqus