Update react monorepo to v18 (major) - autoclosed #9

Closed
kjuulh wants to merge 1 commits from renovate/major-react-monorepo into main
Owner

This PR contains the following updates:

Package Type Update Change
react (source) dependencies major ^17.0.2 -> 18.2.0
react-dom (source) dependencies major ^17.0.2 -> 18.2.0

Release Notes

facebook/react

v18.2.0

React DOM
React DOM Server
Server Components (Experimental)

v18.1.0

React DOM
React DOM Server
ESLint Plugin: React Hooks
Use Subscription

v18.0.0

Below is a list of all new features, APIs, deprecations, and breaking changes.
Read React 18 release post and React 18 upgrade guide for more information.

New Features
React
  • useId 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.
  • startTransition and useTransition 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).
  • useDeferredValue 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.
  • useSyncExternalStore 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.
  • useInsertionEffect 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.
React DOM Client

These new APIs are now exported from react-dom/client:

  • createRoot: New method to create a root to render or unmount. Use it instead of ReactDOM.render. New features in React 18 don't work without it.
  • hydrateRoot: New method to hydrate a server rendered application. Use it instead of ReactDOM.hydrate in conjunction with the new React DOM Server APIs. New features in React 18 don't work without it.

Both createRoot and hydrateRoot accept a new option called onRecoverableError in case you want to be notified when React recovers from errors during rendering or hydration for logging. By default, React will use reportError, or console.error in the older browsers.

React DOM Server

These new APIs are now exported from react-dom/server and have full support for streaming Suspense on the server:

  • renderToPipeableStream: for streaming in Node environments.
  • renderToReadableStream: for modern edge runtime environments, such as Deno and Cloudflare workers.

The existing renderToString method keeps working but is discouraged.


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled due to failing status checks.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [react](https://reactjs.org/) ([source](https://github.com/facebook/react)) | dependencies | major | [`^17.0.2` -> `18.2.0`](https://renovatebot.com/diffs/npm/react/17.0.2/18.2.0) | | [react-dom](https://reactjs.org/) ([source](https://github.com/facebook/react)) | dependencies | major | [`^17.0.2` -> `18.2.0`](https://renovatebot.com/diffs/npm/react-dom/17.0.2/18.2.0) | --- ### Release Notes <details> <summary>facebook/react</summary> ### [`v18.2.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;1820-June-14-2022) ##### React DOM - Provide a component stack as a second argument to `onRecoverableError`. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24591](https://github.com/facebook/react/pull/24591)) - Fix hydrating into `document` causing a blank page on mismatch. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24523](https://github.com/facebook/react/pull/24523)) - Fix false positive hydration errors with Suspense. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24480](https://github.com/facebook/react/pull/24480) and [@&#8203;acdlite](https://github.com/acdlite) in [#&#8203;24532](https://github.com/facebook/react/pull/24532)) - Fix ignored `setState` in Safari when adding an iframe. ([@&#8203;gaearon](https://github.com/gaearon) in [#&#8203;24459](https://github.com/facebook/react/pull/24459)) ##### React DOM Server - Pass information about server errors to the client. ([@&#8203;salazarm](https://github.com/salazarm) and [@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24551](https://github.com/facebook/react/pull/24551) and [#&#8203;24591](https://github.com/facebook/react/pull/24591)) - Allow to provide a reason when aborting the HTML stream. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24680](https://github.com/facebook/react/pull/24680)) - Eliminate extraneous text separators in the HTML where possible. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24630](https://github.com/facebook/react/pull/24630)) - Disallow complex children inside `<title>` elements to match the browser constraints. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24679](https://github.com/facebook/react/pull/24679)) - Fix buffering in some worker environments by explicitly setting `highWaterMark` to `0`. ([@&#8203;jplhomer](https://github.com/jplhomer) in [#&#8203;24641](https://github.com/facebook/react/pull/24641)) ##### Server Components (Experimental) - Add support for `useId()` inside Server Components. ([@&#8203;gnoff](https://github.com/gnoff)) in [#&#8203;24172](https://github.com/facebook/react/pull/24172) ### [`v18.1.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;1810-April-26-2022) ##### React DOM - Fix the false positive warning about `react-dom/client` when using UMD bundle. ([@&#8203;alireza-molaee](https://github.com/alireza-molaee) in [#&#8203;24274](https://github.com/facebook/react/pull/24274)) - Fix `suppressHydrationWarning` to work in production too. ([@&#8203;gaearon](https://github.com/gaearon) in [#&#8203;24271](https://github.com/facebook/react/pull/24271)) - Fix `componentWillUnmount` firing twice inside of Suspense. ([@&#8203;acdlite](https://github.com/acdlite) in [#&#8203;24308](https://github.com/facebook/react/pull/24308)) - Fix some transition updates being ignored. ([@&#8203;acdlite](https://github.com/acdlite) in [#&#8203;24353](https://github.com/facebook/react/pull/24353)) - Fix `useDeferredValue` causing an infinite loop when passed an unmemoized value. ([@&#8203;acdlite](https://github.com/acdlite) in [#&#8203;24247](https://github.com/facebook/react/pull/24247)) - Fix throttling of revealing Suspense fallbacks. ([@&#8203;sunderls](https://github.com/sunderls) in [#&#8203;24253](https://github.com/facebook/react/pull/24253)) - Fix an inconsistency in whether the props object is the same between renders. ([@&#8203;Andarist](https://github.com/Andarist) and [@&#8203;acdlite](https://github.com/acdlite) in [#&#8203;24421](https://github.com/facebook/react/pull/24421)) - Fix a missing warning about a `setState` loop in `useEffect`. ([@&#8203;gaearon](https://github.com/gaearon) in [#&#8203;24298](https://github.com/facebook/react/pull/24298)) - Fix a spurious hydration error. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24404](https://github.com/facebook/react/pull/24404)) - Warn when calling `setState` in `useInsertionEffect`. ([@&#8203;gaearon](https://github.com/gaearon) in [#&#8203;24295](https://github.com/facebook/react/pull/24295)) - Ensure the reason for hydration errors is always displayed. ([@&#8203;gaearon](https://github.com/gaearon) in [#&#8203;24276](https://github.com/facebook/react/pull/24276)) ##### React DOM Server - Fix escaping for the `bootstrapScriptContent` contents. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24385](https://github.com/facebook/react/pull/24385)) - Significantly improve performance of `renderToPipeableStream`. ([@&#8203;gnoff](https://github.com/gnoff) in [#&#8203;24291](https://github.com/facebook/react/pull/24291)) ##### ESLint Plugin: React Hooks - Fix false positive errors with a large number of branches. ([@&#8203;scyron6](https://github.com/scyron6) in [#&#8203;24287](https://github.com/facebook/react/pull/24287)) - Don't consider a known dependency stable when the variable is reassigned. ([@&#8203;afzalsayed96](https://github.com/afzalsayed96) in [#&#8203;24343](https://github.com/facebook/react/pull/24343)) ##### Use Subscription - Replace the implementation with the `use-sync-external-store` shim. ([@&#8203;gaearon](https://github.com/gaearon) in [#&#8203;24289](https://github.com/facebook/react/pull/24289)) ### [`v18.0.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#&#8203;1800-March-29-2022) Below is a list of all new features, APIs, deprecations, and breaking changes. Read [React 18 release post](https://reactjs.org/blog/2022/03/29/react-v18.html) and [React 18 upgrade guide](https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html) for more information. ##### New Features ##### React - `useId` 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. - `startTransition` and `useTransition` 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). - `useDeferredValue` 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. - `useSyncExternalStore` 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. - `useInsertionEffect` 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. ##### React DOM Client These new APIs are now exported from `react-dom/client`: - `createRoot`: New method to create a root to `render` or `unmount`. Use it instead of `ReactDOM.render`. New features in React 18 don't work without it. - `hydrateRoot`: New method to hydrate a server rendered application. Use it instead of `ReactDOM.hydrate` in conjunction with the new React DOM Server APIs. New features in React 18 don't work without it. Both `createRoot` and `hydrateRoot` accept a new option called `onRecoverableError` in case you want to be notified when React recovers from errors during rendering or hydration for logging. By default, React will use [`reportError`](https://developer.mozilla.org/en-US/docs/Web/API/reportError), or `console.error` in the older browsers. ##### React DOM Server These new APIs are now exported from `react-dom/server` and have full support for streaming Suspense on the server: - `renderToPipeableStream`: for streaming in Node environments. - `renderToReadableStream`: for modern edge runtime environments, such as Deno and Cloudflare workers. The existing `renderToString` method keeps working but is discouraged. </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled due to failing status checks. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
kjuulh added 1 commit 2022-10-26 16:56:33 +02:00
Update react monorepo to v18
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
35035052d2
kjuulh changed title from Update react monorepo to v18 (major) to Update react monorepo to v18 (major) - autoclosed 2022-10-26 18:37:21 +02:00
kjuulh closed this pull request 2022-10-26 18:37:21 +02:00
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rawpotion/man#9
No description provided.