Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

fix(deps): update react monorepo to v18 (major) #162

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 18, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react (source) 17.0.2 -> 18.3.1 age adoption passing confidence
react-dom (source) 17.0.2 -> 18.3.1 age adoption passing confidence

Release Notes

facebook/react (react)

v18.3.1

Compare Source

v18.3.0

Compare Source

v18.2.0

Compare Source

React DOM
React DOM Server
Server Components (Experimental)

v18.1.0

Compare Source

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

v18.0.0

Compare Source

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.

facebook/react (react-dom)

v18.3.1

Compare Source

v18.3.0

Compare Source

v18.2.0

Compare Source

React DOM
React DOM Server
Server Components (Experimental)

v18.1.0

Compare Source

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

v18.0.0

Compare Source

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: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, 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, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner May 18, 2023 19:02
@renovate
Copy link
Contributor Author

renovate bot commented May 18, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @edx/frontend-component-footer@13.0.2
npm error Found: react@18.3.1
npm error node_modules/react
npm error   react@"18.3.1" from the root project
npm error   peer react@">=16.8.0" from @dnd-kit/accessibility@3.0.1
npm error   node_modules/@dnd-kit/accessibility
npm error     @dnd-kit/accessibility@"^3.0.0" from @dnd-kit/core@6.0.8
npm error     node_modules/@dnd-kit/core
npm error       peer @dnd-kit/core@"^6.0.7" from @dnd-kit/sortable@7.0.2
npm error       node_modules/@dnd-kit/sortable
npm error         @dnd-kit/sortable@"^7.0.2" from @edx/frontend-lib-content-components@2.0.0
npm error         node_modules/@edx/frontend-lib-content-components
npm error       1 more (@edx/frontend-lib-content-components)
npm error   37 more (@dnd-kit/core, @dnd-kit/sortable, @dnd-kit/utilities, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.9.0 || ^17.0.0" from @edx/frontend-component-footer@13.0.2
npm error node_modules/@edx/frontend-component-footer
npm error   @edx/frontend-component-footer@"^13.0.2" from the root project
npm error
npm error Conflicting peer dependency: react@17.0.2
npm error node_modules/react
npm error   peer react@"^16.9.0 || ^17.0.0" from @edx/frontend-component-footer@13.0.2
npm error   node_modules/@edx/frontend-component-footer
npm error     @edx/frontend-component-footer@"^13.0.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /tmp/renovate/cache/others/npm/_logs/2024-04-26T20_18_37_511Z-eresolve-report.txt

npm error A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-04-26T20_18_37_511Z-debug-0.log

@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 4 times, most recently from 3b6cee0 to 81946a5 Compare May 22, 2023 14:53
@jesperhodge
Copy link
Contributor

We can't do this while using Enzyme, I think.

@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 5 times, most recently from 059e40f to 2bbfad7 Compare May 27, 2023 00:25
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 2bd8581 to 2cc91c2 Compare June 4, 2023 21:48
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 10 times, most recently from a3e9a30 to 94b5dc5 Compare June 15, 2023 12:17
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 6 times, most recently from 2828ebc to 750f4df Compare June 22, 2023 18:08
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 8d3527c to 39960c0 Compare January 29, 2024 15:15
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 39960c0 to c7aa657 Compare February 8, 2024 19:39
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 12b936f to e589bee Compare February 19, 2024 09:59
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from d7a5013 to e53ec05 Compare March 8, 2024 23:05
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 6 times, most recently from b4e8991 to b68f08a Compare March 18, 2024 13:58
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from b68f08a to 7586a28 Compare March 21, 2024 18:49
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 4a73644 to a702767 Compare April 19, 2024 12:33
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 2 times, most recently from 714c365 to ae8c48f Compare April 26, 2024 20:18
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from ae8c48f to 2235345 Compare May 9, 2024 12:57
Copy link
Contributor Author

renovate bot commented May 9, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @edx/frontend-component-footer@13.0.2
npm error Found: react@18.3.1
npm error node_modules/react
npm error   react@"18.3.1" from the root project
npm error   peer react@">=16.8.0" from @dnd-kit/accessibility@3.0.1
npm error   node_modules/@dnd-kit/accessibility
npm error     @dnd-kit/accessibility@"^3.0.0" from @dnd-kit/core@6.0.8
npm error     node_modules/@dnd-kit/core
npm error       peer @dnd-kit/core@"^6.0.7" from @dnd-kit/sortable@7.0.2
npm error       node_modules/@dnd-kit/sortable
npm error         @dnd-kit/sortable@"^7.0.2" from @edx/frontend-lib-content-components@2.1.7
npm error         node_modules/@edx/frontend-lib-content-components
npm error       1 more (@edx/frontend-lib-content-components)
npm error   36 more (@dnd-kit/core, @dnd-kit/sortable, @dnd-kit/utilities, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^16.9.0 || ^17.0.0" from @edx/frontend-component-footer@13.0.2
npm error node_modules/@edx/frontend-component-footer
npm error   @edx/frontend-component-footer@"^13.0.2" from the root project
npm error
npm error Conflicting peer dependency: react@17.0.2
npm error node_modules/react
npm error   peer react@"^16.9.0 || ^17.0.0" from @edx/frontend-component-footer@13.0.2
npm error   node_modules/@edx/frontend-component-footer
npm error     @edx/frontend-component-footer@"^13.0.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /tmp/renovate/cache/others/npm/_logs/2024-06-17T15_20_58_475Z-eresolve-report.txt
npm error A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-06-17T15_20_58_475Z-debug-0.log

@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 2235345 to 88469bc Compare May 9, 2024 13:15
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch 3 times, most recently from ccd0b4a to ad92076 Compare May 17, 2024 13:05
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from ad92076 to 0adcebc Compare June 17, 2024 06:49
@renovate renovate bot force-pushed the renovate/major-react-monorepo branch from 0adcebc to 57e7403 Compare June 17, 2024 15:21
Copy link
Contributor Author

renovate bot commented Jul 17, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 18.x releases. But if you manually upgrade to 18.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/major-react-monorepo branch July 17, 2024 20:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants