react-test-renderer
19.3.1 · 14 Oct 2026MIT12.8M / weekRepositoryHomepagenpmAtom feed
Upgrading react-test-renderer From 17.0.2 to 18.0.0
1 release in betweenevery note read
- 16
- changes to make
- 0
- advisories fixed
- 19
- new
- 14
- fixes
Start here
Before you upgrade
Tick each one off as you go- Breaking18.0.0
- Breaking18.0.0
- Breaking18.0.0
- Breaking18.0.0
- Breaking18.0.0
- Breaking18.0.0
- Breaking18.0.0
- Breaking18.0.0
- Breaking18.0.0
- Breaking18.0.0
Release by release
- Breaking
Below is a list of all new features, APIs, deprecations, and breaking changes.
- Breaking
Automatic batching: This release introduces a performance improvement that changes to the way React batches updates to do more batching automatically. See Automatic batching for fewer renders in React 18 for more info. In the rare case that you need to opt out, wrap the state update in
flushSync. - Breaking
Stricter Strict Mode: In the future, React will provide a feature that lets components preserve state between unmounts. To prepare for it, React 18 introduces a new development-only check to Strict Mode. React will automatically unmount and remount every component, whenever a component mounts for the first time, restoring the previous state on the second mount. If this breaks your app, consider removing Strict Mode until you can fix the components to be resilient to remounting with existing state.
- Breaking
Consistent useEffect timing: React now always synchronously flushes effect functions if the update was triggered during a discrete user input event such as a click or a keydown event. Previously, the behavior wasn't always predictable or consistent.
- Breaking
35 other lines we could not sort, mostly version bumps
- 18.0.0
useIdis 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. - 18.0.0
startTransitionanduseTransitionlet 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). - 18.0.0
useDeferredValuelets 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. - 18.0.0
useSyncExternalStoreis a new hook that allows external stores to support concurrent reads by forcing updates to the store to be synchronous. It removes the need foruseEffectwhen implementing subscriptions to external data sources, and is recommended for any library that integrates with state external to React. - 18.0.0
useInsertionEffectis 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. - 18.0.0
createRoot: New method to create a root torenderorunmount. Use it instead ofReactDOM.render. New features in React 18 don't work without it. - 18.0.0
hydrateRoot: New method to hydrate a server rendered application. Use it instead ofReactDOM.hydratein conjunction with the new React DOM Server APIs. New features in React 18 don't work without it. - 18.0.0
renderToPipeableStream: for streaming in Node environments. - 18.0.0
renderToReadableStream: for modern edge runtime environments, such as Deno and Cloudflare workers. - 18.0.0
Components can now render
undefined: React no longer throws if you returnundefinedfrom a component. This makes the allowed component return values consistent with values that are allowed in the middle of a component tree. We suggest to use a linter to prevent mistakes like forgetting areturnstatement before JSX.
1 internal line (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.