fix(deps): update react monorepo (major)#3484
Conversation
bb0e592 to
55d9ee4
Compare
yarn.lock
Outdated
| version: 19.2.3 | ||
| resolution: "react-test-renderer@npm:19.2.3" | ||
| dependencies: | ||
| react-is: "npm:^18.3.1" | ||
| react-shallow-renderer: "npm:^16.15.0" | ||
| scheduler: "npm:^0.23.2" | ||
| react-is: "npm:^19.2.3" | ||
| scheduler: "npm:^0.27.0" | ||
| peerDependencies: | ||
| react: ^18.3.1 | ||
| checksum: 10c0/c633558ef9af33bc68f0c4dbb5163a004c4fb9eade7bd0a7cfc0355fb367f36bd9d96533c90b7e85a146be6c525113a15f58683d269e0177ad77e2b04d4fe51c | ||
| react: ^19.2.3 | ||
| checksum: 10c0/842b82239dbddbc536083a6260c3e1b0507c02a3400bd05879fc19160468fd0f8ab79fec5dceffa6113b131835cc7621212f8415b46ea5156ab66bbfd7e24297 | ||
| languageName: node | ||
| linkType: hard | ||
|
|
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
e2769db to
bae9636
Compare
bae9636 to
ac529ee
Compare
| "@types/js-cookie": "^3.0.6", | ||
| "@types/js-yaml": "^4.0.5", | ||
| "@types/lodash": "^4.14.195", | ||
| "@types/react": "^18.3.3", | ||
| "@types/react": "^19.0.0", | ||
| "@types/react-copy-to-clipboard": "^5.0.4", | ||
| "@types/react-dom": "^18.3.0", | ||
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
ac529ee to
53c67d2
Compare
53c67d2 to
0626d16
Compare
0626d16 to
8333110
Compare
03978a1 to
cc2f1c4
Compare
| "@types/js-cookie": "^3.0.6", | ||
| "@types/js-yaml": "^4.0.5", | ||
| "@types/lodash": "^4.14.195", | ||
| "@types/react": "^18.3.3", | ||
| "@types/react": "^19.0.0", | ||
| "@types/react-copy-to-clipboard": "^5.0.4", | ||
| "@types/react-dom": "^18.3.0", | ||
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
d3a3a1e to
7091ed7
Compare
7091ed7 to
96ed32a
Compare
package.json
Outdated
| "phaser": "~3.90.0", | ||
| "query-string": "^9.0.0", | ||
| "re-resizable": "^6.9.9", | ||
| "react": "^18.3.1", | ||
| "react": "^19.0.0", | ||
| "react-ace": "^14.0.0", | ||
| "react-copy-to-clipboard": "^5.1.0", | ||
| "react-debounce-render": "^8.0.2", | ||
| "react-dom": "^18.3.1", | ||
| "react-dom": "^19.0.0", | ||
| "react-drag-drop-files": "^3.0.0", | ||
| "react-draggable": "^4.4.5", | ||
| "react-dropzone": "^14.2.3", |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
849b02c to
2d3b44f
Compare
04c549e to
bb9ae6c
Compare
c0f8f64 to
472e451
Compare
package.json
Outdated
| "phaser": "~3.90.0", | ||
| "query-string": "^9.0.0", | ||
| "re-resizable": "^6.9.9", | ||
| "react": "^18.3.1", | ||
| "react": "^19.0.0", | ||
| "react-ace": "^14.0.0", | ||
| "react-copy-to-clipboard": "^5.1.0", | ||
| "react-debounce-render": "^8.0.2", | ||
| "react-dom": "^18.3.1", | ||
| "react-dom": "^19.0.0", | ||
| "react-drag-drop-files": "^3.0.0", | ||
| "react-draggable": "^4.4.5", | ||
| "react-dropzone": "^14.2.3", |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| "@types/js-cookie": "^3.0.6", | ||
| "@types/js-yaml": "^4.0.5", | ||
| "@types/lodash": "^4.14.195", | ||
| "@types/react": "^18.3.3", | ||
| "@types/react": "^19.0.0", | ||
| "@types/react-copy-to-clipboard": "^5.0.4", | ||
| "@types/react-dom": "^18.3.0", | ||
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
There was a problem hiding this comment.
Bug: The react-sortable-hoc library is incompatible with React 19 as it uses the removed findDOMNode API, which will cause a runtime crash in the Chapter Publisher feature.
Severity: HIGH
Suggested Fix
The react-sortable-hoc library is unmaintained and incompatible with React 19. It should be replaced with a modern, maintained alternative, such as @dnd-kit, which is the recommended migration path by the original library's authors.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L139-L147
Potential issue: The upgrade to React 19 introduces a breaking change that will cause a
runtime crash in the Chapter Publisher feature. The `react-sortable-hoc` library, a
dependency used for drag-and-drop functionality, relies on the `findDOMNode` API. This
API has been completely removed in React 19. As a result, while the application will
build and load successfully, any attempt by an administrator to access the Chapter
Publisher will trigger a crash, rendering the feature completely non-functional.
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
There was a problem hiding this comment.
Bug: The upgrade to react-test-renderer v19 removes the /shallow export, but TestUtils.ts still imports from it, which will cause the test suite to fail.
Severity: CRITICAL
Suggested Fix
To fix this, you can install react-shallow-renderer as a separate dependency and update the import statement in TestUtils.ts. Alternatively, refactor the tests to remove the usage of the shallow renderer and switch to a more modern testing library.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L147
Potential issue: The upgrade of `react-test-renderer` to version 19 introduces a
breaking change. React 19 removes the `react-test-renderer/shallow` export, which is
currently imported in `TestUtils.ts` via `import { createRenderer } from
'react-test-renderer/shallow';`. Because this module path no longer exists in the
updated package, any attempt to run the test suite will result in a runtime import
error, such as `Error: Cannot find module 'react-test-renderer/shallow'`. This will
cause the entire test suite to fail, as numerous test files depend on these utilities.
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
There was a problem hiding this comment.
Bug: The upgrade to react-test-renderer v19 causes a runtime error because the code imports from react-test-renderer/shallow, an API that has been removed.
Severity: CRITICAL
Suggested Fix
The react-test-renderer/shallow export is deprecated. Add the react-shallow-renderer package as a new dev dependency. Then, update the import in src/commons/utils/TestUtils.ts to source createRenderer from the new react-shallow-renderer package. Also, update the @types/react-test-renderer dependency to match the major version of react-test-renderer.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L147
Potential issue: The `react-test-renderer` package was upgraded to v19, but the code was
not updated to reflect breaking changes in the new version. The file
`src/commons/utils/TestUtils.ts` imports `createRenderer` from
`react-test-renderer/shallow`, an export path that was completely removed in v19. This
will cause a runtime import error when tests are executed, leading to the failure of the
test suite. The issue is masked during compilation because the corresponding
`@types/react-test-renderer` package was not upgraded from v18.
| "react-dom": "^19.0.0", | ||
| "react-drag-drop-files": "^3.0.0", | ||
| "react-draggable": "^4.4.5", | ||
| "react-dropzone": "^15.0.0", |
There was a problem hiding this comment.
Bug: The react-konva package was not upgraded to a React 19 compatible version, while React itself was upgraded to v19. This will cause runtime errors.
Severity: CRITICAL
Suggested Fix
Upgrade the react-konva package in package.json from ^18.2.10 to a version compatible with React 19, such as ^19.0.0 or the latest available v19 release. Ensure the yarn.lock file is updated accordingly.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L86
Potential issue: The pull request upgrades `react` and `react-dom` from version 18 to 19
but leaves `react-konva` at version `^18.2.10`. The `react-konva` library depends on
React's internal APIs, and its major version must match React's major version to ensure
compatibility. This version mismatch will lead to runtime failures when components using
`react-konva` are rendered, as its v18 code is incompatible with React 19's internal
changes. This will break core visualization features like the CSE Machine and Data
Visualizer.
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
There was a problem hiding this comment.
Bug: The upgrade of react-test-renderer to v19 removes the /shallow export, which is still used in the codebase. This will cause the entire test suite to fail.
Severity: CRITICAL
Suggested Fix
Replace the deprecated react-test-renderer/shallow import. Install the separate react-shallow-renderer package and update the import in src/commons/utils/TestUtils.ts to use it. Additionally, upgrade the @types/react-test-renderer package to match the version of react-test-renderer.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L147
Potential issue: The `react-test-renderer` package was upgraded to version 19, but its
`/shallow` export, which is used in `src/commons/utils/TestUtils.ts`, was removed in
this version. The type definitions package `@types/react-test-renderer` also remains at
an older version. When the test suite runs, the attempt to import from the non-existent
`react-test-renderer/shallow` path will cause a `MODULE_NOT_FOUND` error. This will
prevent any tests from running and cause the entire test suite to fail.
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
There was a problem hiding this comment.
Bug: The upgrade to react-test-renderer v19 removes the react-test-renderer/shallow export, but the code still imports from it, which will cause a runtime error.
Severity: CRITICAL
Suggested Fix
Refactor the code in src/commons/utils/TestUtils.ts to no longer import from react-test-renderer/shallow, as this API was removed. An alternative shallow rendering approach compatible with React 19 should be used. Alternatively, revert the upgrade of react-test-renderer to a version below 19.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L147
Potential issue: The upgrade of `react-test-renderer` to v19.2.4 introduces a breaking
change. This version removes the `react-test-renderer/shallow` subpath export, which is
currently being imported in `src/commons/utils/TestUtils.ts`. Because this import path
no longer exists in the upgraded package, any attempt to run tests or execute code that
relies on `TestUtils.ts` will result in a module resolution error at runtime, causing a
crash and breaking the test suite.
| "phaser": "~3.90.0", | ||
| "query-string": "^9.0.0", | ||
| "re-resizable": "^6.9.9", | ||
| "react": "^18.3.1", | ||
| "react": "^19.0.0", | ||
| "react-ace": "^14.0.0", | ||
| "react-debounce-render": "^8.0.2", | ||
| "react-dom": "^18.3.1", | ||
| "react-dom": "^19.0.0", | ||
| "react-drag-drop-files": "^3.0.0", | ||
| "react-draggable": "^4.4.5", | ||
| "react-dropzone": "^15.0.0", |
There was a problem hiding this comment.
Bug: The react-sortable-hoc library is incompatible with React 19 because it uses the removed findDOMNode API, which will cause a runtime crash in the Chapter Publisher feature.
Severity: CRITICAL
Suggested Fix
Replace the unmaintained react-sortable-hoc library. The library's maintainers recommend migrating to a modern drag-and-drop solution like @dnd-kit to ensure compatibility with React 19 and future versions.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L77-L86
Potential issue: The upgrade to React 19 introduces an incompatibility with the
`react-sortable-hoc` library, which is no longer maintained. This library depends on
`ReactDOM.findDOMNode`, an API that was completely removed in React 19. As a result, any
component using this library, such as `SortableList` in the Chapter Publisher feature,
will trigger a `TypeError: ReactDOM.findDOMNode is not a function` runtime error upon
rendering. This will cause the Chapter Publisher admin feature to crash, blocking staff
from managing chapter files.
| "@types/js-cookie": "^3.0.6", | ||
| "@types/js-yaml": "^4.0.5", | ||
| "@types/lodash": "^4.14.195", | ||
| "@types/react": "^18.3.3", | ||
| "@types/react": "^19.0.0", | ||
| "@types/react-copy-to-clipboard": "^5.0.4", | ||
| "@types/react-dom": "^18.3.0", | ||
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
There was a problem hiding this comment.
Bug: The test utility shallowRender imports from react-test-renderer/shallow, a path that was removed in React 19. This will cause the test suite to fail.
Severity: CRITICAL
Suggested Fix
To resolve the test failures, either install the react-shallow-renderer package directly and update the import path in TestUtils.ts, or migrate the affected tests from shallow rendering to use a more modern library like @testing-library/react.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L139-L147
Potential issue: The upgrade to React 19 removes the `react-test-renderer/shallow`
subpath export. The codebase contains a `shallowRender` test utility that imports
`createRenderer` from this path. Since the export no longer exists in
`react-test-renderer@^19.0.0` and the `react-shallow-renderer` package has been removed
from dependencies, any test file that uses the `shallowRender` function will fail with a
module import error. This will prevent the test suite from running successfully.
| "@types/js-cookie": "^3.0.6", | ||
| "@types/js-yaml": "^4.0.5", | ||
| "@types/lodash": "^4.14.195", | ||
| "@types/react": "^18.3.3", | ||
| "@types/react": "^19.0.0", | ||
| "@types/react-copy-to-clipboard": "^5.0.4", | ||
| "@types/react-dom": "^18.3.0", | ||
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
There was a problem hiding this comment.
Bug: react-draggable v4 is used without the nodeRef prop in MobileKeyboard.tsx and DraggableRepl.tsx. This will crash in React 19, which removes the findDOMNode fallback.
Severity: CRITICAL
Suggested Fix
Add the nodeRef prop to all <Draggable> components, as demonstrated in Chatbot.tsx. This involves creating a React.useRef, passing it to the nodeRef prop of <Draggable>, and attaching it as a ref to the underlying draggable DOM element.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L139-L147
Potential issue: The upgrade to React 19 removes `ReactDOM.findDOMNode`. The
`react-draggable` library (v4.4.5) relies on this function as a fallback when the
`nodeRef` prop is not provided. The components `MobileKeyboard.tsx` and
`DraggableRepl.tsx` use `<Draggable>` without `nodeRef`, which will cause a runtime
crash when users on mobile devices attempt to drag the keyboard or the REPL panel. This
breaks core functionality for mobile users.
| "phaser": "~3.90.0", | ||
| "query-string": "^9.0.0", | ||
| "re-resizable": "^6.9.9", | ||
| "react": "^18.3.1", | ||
| "react": "^19.0.0", | ||
| "react-ace": "^14.0.0", | ||
| "react-debounce-render": "^8.0.2", | ||
| "react-dom": "^18.3.1", | ||
| "react-dom": "^19.0.0", | ||
| "react-drag-drop-files": "^3.0.0", | ||
| "react-draggable": "^4.4.5", | ||
| "react-dropzone": "^15.0.0", |
There was a problem hiding this comment.
Bug: react-sortable-hoc v2.0.0 is incompatible with React 19 as it relies on findDOMNode. This will cause crashes when reordering items in the Chapter Publisher.
Severity: CRITICAL
Suggested Fix
Replace the unmaintained react-sortable-hoc library with a modern, compatible alternative like @dnd-kit, as recommended by the original library authors. This will require refactoring the SortableList component and its usage in ChapterPublisherEditor.tsx.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L77-L86
Potential issue: The upgrade to React 19 is incompatible with `react-sortable-hoc`
v2.0.0, which is not being updated in this PR. The library's architecture depends on
`ReactDOM.findDOMNode`, a function that is completely removed in React 19. This will
cause a runtime crash when users interact with the drag-and-drop functionality in the
`ChapterPublisherEditor` component, specifically when trying to reorder chapter files.
| "@types/react-dom": "^19.0.0", | ||
| "@types/react-redux": "^7.1.24", | ||
| "@types/react-syntax-highlighter": "^15.5.7", | ||
| "@types/react-test-renderer": "^18.0.0", |
There was a problem hiding this comment.
Bug: The upgrade of react-test-renderer to v19 breaks the import of createRenderer from react-test-renderer/shallow, as this export was removed. This will cause test suites to fail.
Severity: CRITICAL
Suggested Fix
To fix the broken import, install the react-shallow-renderer package and update the import in src/commons/utils/TestUtils.ts to import { createRenderer } from 'react-shallow-renderer';. Additionally, update the @types/react-test-renderer package to match version 19.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L147
Potential issue: The `react-test-renderer` package was upgraded to version 19, but the
code in `src/commons/utils/TestUtils.ts` still attempts to import `createRenderer` from
the `react-test-renderer/shallow` path. This export was removed in version 19 of the
package; the shallow renderer is now available in a separate `react-shallow-renderer`
package. This will cause a runtime import failure when the test suite runs, breaking all
tests that depend on the `shallowRender` utility and preventing CI checks from passing.
| "process": "^0.11.10", | ||
| "react-error-overlay": "^6.0.11", | ||
| "react-test-renderer": "^18.2.0", | ||
| "react-test-renderer": "^19.0.0", |
There was a problem hiding this comment.
Bug: The code imports from react-test-renderer/shallow, a path that was removed in React 19. This will cause all dependent tests to fail at module load time.
Severity: CRITICAL
Suggested Fix
Since the shallow renderer was removed in React 19, all usages of it should be migrated. Replace the shallow rendering logic in TestUtils.ts and dependent tests with an alternative, such as using ReactTestRenderer.create() from the main react-test-renderer package or migrating to React Testing Library.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L176
Potential issue: The upgrade to `react-test-renderer@19` introduces a breaking change.
The code in `src/commons/utils/TestUtils.ts` imports `createRenderer` from
`react-test-renderer/shallow`. This module path was completely removed in React 19. As a
result, numerous test files (over 30) that depend on `TestUtils.ts` will fail with a
module import error when the test suite is executed. This is a load-time error that will
prevent the tests from running, rather than a type mismatch issue.
| "react": "^19.0.0", | ||
| "react-ace": "^14.0.0", | ||
| "react-debounce-render": "^8.0.2", | ||
| "react-dom": "^18.3.1", | ||
| "react-dom": "^19.0.0", |
There was a problem hiding this comment.
Bug: DraggableRepl.tsx and MobileKeyboard.tsx use <Draggable> without the required nodeRef prop. This will cause a runtime crash in React 19, which removes the findDOMNode fallback.
Severity: HIGH
Suggested Fix
In DraggableRepl.tsx and MobileKeyboard.tsx, create a React.useRef for the draggable element and pass it to the <Draggable> component via the nodeRef prop. This will prevent react-draggable from attempting to use the now-removed findDOMNode API.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L80-L83
Potential issue: The upgrade to React 19 removes `ReactDOM.findDOMNode`, which the
`react-draggable` library uses as a fallback when a `nodeRef` prop is not provided. The
components in `DraggableRepl.tsx` and `MobileKeyboard.tsx` use the `<Draggable>`
component without this required `nodeRef` prop. As a result, any user attempt to drag
these UI elements will cause a runtime crash. The `Chatbot.tsx` component correctly
implements this pattern, indicating an oversight in the other two files.
This PR contains the following updates:
^18.3.3→^19.0.0^18.3.0→^19.0.0^5.2.0→^7.0.0^18.3.1→^19.0.0^18.3.1→^19.0.0^18.2.0→^19.0.0Release Notes
facebook/react (eslint-plugin-react-hooks)
v7.0.1Compare Source
useEffectEventvalues as JSX props to guard against accidental propagation. (#34820 by @jf-eirinha)export =so eslint-plugin-react-hooks emits correct types for consumers in Node16 ESM projects. (#34949 by @karlhorky)configs.flatso theconfigsexport is always defined. (#34950 by @poteto)v7.0.0Compare Source
This release slims down presets to just 2 configurations (
recommendedandrecommended-latest), and all compiler rules are enabled by default.recommended-latest-legacyandflat/recommendedconfigs. The plugin now providesrecommended(legacy and flat configs with all recommended rules), andrecommended-latest(legacy and flat configs with all recommended rules plus new bleeding edge experimental compiler rules). (@poteto in #34757)v6.1.1Compare Source
Note: 6.1.0 accidentally allowed use of
recommendedwithout flat config, causing errors when used with ESLint v9'sdefineConfig()helper. This has been fixed in 6.1.1.recommendedconfig for flat config compatibility. Therecommendedconfig has been converted to flat config format. Non-flat config users should userecommended-legacyinstead. (@poteto in #34700)recommended-latestandrecommended-latest-legacyconfigs that include React Compiler rules. (@poteto in #34675)NoUnusedOptOutDirectivesrule. (@poteto in #34703)hermes-parserand dependency. (@poteto in #34719)@babel/plugin-proposal-private-methodsdependency. (@ArnaudBarre and @josephsavona in #34715)v6.1.0Compare Source
Note: Version 6.0.0 was mistakenly released and immediately deprecated and untagged on npm. This is the first official 6.x major release and includes breaking changes.
recommendedpreset. Legacy config moved torecommended-legacy. (@michaelfaith in #32457)usewithin try/catch blocks. (@poteto in #34040)useEffectEventfunctions in arbitrary closures. (@jbrown215 in #33544)React.useEffectin addition touseEffectin rules-of-hooks. (@Ayc0 in #34076)react-hookssettings config option that to acceptadditionalEffectHooksthat are used across exhaustive-deps and rules-of-hooks rules. (@jbrown215) in #34497v6.0.0Compare Source
Accidentally released. See 6.1.0 for the actual changes.
facebook/react (react)
v19.2.4: 19.2.4 (January 26th, 2026)Compare Source
React Server Components
v19.2.3: 19.2.3 (December 11th, 2025)Compare Source
React Server Components
v19.2.2: 19.2.2 (December 11th, 2025)Compare Source
React Server Components
react-server-dom-webpack/*.unbundledto privatereact-server-dom-unbundled(@eps1lon #35290)v19.2.1: 19.2.1 (December 3rd, 2025)Compare Source
React Server Components
v19.2.0Compare Source
Below is a list of all new features, APIs, and bug fixes.
Read the React 19.2 release post for more information.
New React Features
<Activity>: A new API to hide and restore the UI and internal state of its children.useEffectEventis a React Hook that lets you extract non-reactive logic into an Effect Event.cacheSignal(for RSCs) lets your know when thecache()lifetime is over.New React DOM Features
resume: to resume a prerender to a stream.resumeAndPrerender: to resume a prerender to HTML.resumeToPipeableStream: to resume a prerender to a stream.resumeAndPrerenderToNodeStream: to resume a prerender to HTML.prerenderAPIs to return apostponedstate that can be passed to theresumeAPIs.Notable changes
<ViewTransition>Component. React will batch as much reveals as possible before the first paint while trying to hit popular first-contentful paint metrics.prerender,renderToReadableStream) to server-side-rendering APIs for Node.js:IDs generated by useIdAll Changes
React
<Activity />was developed over many years, starting beforeClassComponent.setState(@acdlite @sebmarkbage and many others)%oplaceholder (@eps1lon #34198)useDeferredValueloop in popstate event (@acdlite #32821)useDeferredValue(@acdlite #34376)cacheSignal(@sebmarkbage #33557)React DOM
:for IDs generated byuseId(@sebmarkbage, @eps1lon: #32001, #33342#33099, #33422)nonceto be used on hoistable styles (@Andarist #32461)React.useinsideReact.lazy-ed Component (@hi-ogawa #33941)progressiveChunkSizeoption for server-side-rendering APIs (@sebmarkbage #33027)React Server Components
<img>and<link>using hints before they're rendered (@sebmarkbage #34604)filterStackFrame(@eps1lon #33707)React Reconciler
on*handlers to account for upcoming experimental APIsv19.1.5: 19.1.5 (January 26th, 2026)Compare Source
React Server Components
v19.1.4: 19.1.4 (December 11th, 2025)Compare Source
React Server Components
v19.1.3: 19.1.3 (December 11th, 2025)Compare Source
React Server Components
react-server-dom-webpack/*.unbundledto privatereact-server-dom-unbundled(@eps1lon #35290)v19.1.2: 19.1.2 (December 3rd, 2025)Compare Source
React Server Components
v19.1.1Compare Source
React
v19.1.0Compare Source
Owner Stack
An Owner Stack is a string representing the components that are directly responsible for rendering a particular component. You can log Owner Stacks when debugging or use Owner Stacks to enhance error overlays or other development tools. Owner Stacks are only available in development builds. Component Stacks in production are unchanged.
#32538, #32529, #32538
React
useIdto use valid CSS selectors, changing format from:r123:to«r123». #32001React DOM
hrefattribute is an empty string #31783getHoistableRoot()didn’t work properly when the container was a Document #32321<!-- -->) as a DOM container. #32250<script>and<template>tags to be nested within<select>tags. #31837use-sync-external-store
exportsfield topackage.jsonforuse-sync-external-storeto support various entrypoints. #25231React Server Components
unstable_prerender, a new experimental API for prerendering React Server Components on the server #31724registerServerReferencein client builds to handle server references in different environments. #32534v19.0.4: 19.0.4 (January 26th, 2026)Compare Source
React Server Components
v19.0.3: 19.0.3 (December 11th, 2025)Compare Source
React Server Components
v19.0.2: 19.0.2 (December 11th, 2025)Compare Source
React Server Components
v19.0.1: 19.0.1 (December 3rd, 2025)Compare Source
React Server Components
v19.0.0Compare Source
Below is a list of all new features, APIs, deprecations, and breaking changes. Read React 19 release post and React 19 upgrade guide for more information.
New Features
React
startTransitioncan now accept async functions. Functions passed tostartTransitionare called “Actions”. A given Transition can include one or more Actions which update state in the background and update the UI with one commit. In addition to updating state, Actions can now perform side effects including async requests, and the Action will wait for the work to finish before finishing the Transition. This feature allows Transitions to include side effects likefetch()in the pending state, and provides support for error handling, and optimistic updates.useActionState: is a new hook to order Actions inside of a Transition with access to the state of the action, and the pending state. It accepts a reducer that can call Actions, and the initial state used for first render. It also accepts an optional string that is used if the action is passed to a formactionprop to support progressive enhancement in forms.useOptimistic: is a new hook to update state while a Transition is in progress. It returns the state, and a set function that can be called inside a transition to “optimistically” update the state to expected final value immediately while the Transition completes in the background. When the transition finishes, the state is updated to the new value.use: is a new API that allows reading resources in render. In React 19,useaccepts a promise or Context. If provided a promise,usewill suspend until a value is resolved.usecan only be used in render but can be called conditionally.refas a prop: Refs can now be used as props, removing the need forforwardRef.React DOM Client
<form> actionprop: Form Actions allow you to manage forms automatically and integrate withuseFormStatus. When a<form> actionsucceeds, React will automatically reset the form for uncontrolled components. The form can be reset manually with the newrequestFormResetAPI.<button> and <input> formActionprop: Actions can be passed to theformActionprop to configure form submission behavior. This allows using different Actions depending on the input.useFormStatus: is a new hook that provides the status of the parent<form> action, as if the form was a Context provider. The hook returns the values:pending,data,method, andaction.<head>section of the document.<head>on the client before revealing the content of a Suspense boundary that depends on that stylesheet.preinit,preload,prefetchDNS, andpreconnectAPIs to optimize initial page loads by moving discovery of additional resources like fonts out of stylesheet loading. They can also be used to prefetch resources used by an anticipated navigation.React DOM Server
prerenderandprerenderToNodeStreamAPIs for static site generation. They are designed to work with streaming environments like Node.js Streams and Web Streams. UnlikerenderToString, they wait for data to load for HTML generation.React Server Components
Deprecations
element.refaccess: React 19 supports ref as a prop, so we’re deprecatingelement.refin favor ofelement.props.ref. Accessing will result in a warning.react-test-renderer: In React 19, react-test-renderer logs a deprecation warning and has switched to concurrent rendering for web usage. We recommend migrating your tests to @testing-library/react or @testing-library/react-nativeBreaking Changes
React 19 brings in a number of breaking changes, including the removals of long-deprecated APIs. We recommend first upgrading to
18.3.1, where we've added additional deprecation warnings. Check out the upgrade guide for more details and guidance on codemodding.React
onUncaughtErrorandonCaughtErrormethods tocreateRootandhydrateRootto customize this error handling.propTypes: UsingpropTypeswill now be silently ignored. If required, we recommend migrating to TypeScript or another type-checking solution.defaultPropsfor functions: ES6 default parameters can be used in place. Class components continue to supportdefaultPropssince there is no ES6 alternative.contextTypesandgetChildContext: Legacy Context for class components has been removed in favor of thecontextTypeAPI.React.createFactory: Now that JSX is broadly supported, allcreateFactoryusage can be migrated to JSX components.react-test-renderer/shallow: This has been a re-export of react-shallow-renderer since React 18. If needed, you can continue to use the third-party package directly. We recommend using @testing-library/react or @testing-library/react-native instead.React DOM
react-dom/test-utils: We’ve movedactfromreact-dom/test-utilsto react. All other utilities have been removed.ReactDOM.render,ReactDOM.hydrate: These have been removed in favor of the concurrent equivalents:ReactDOM.createRootandReactDOM.hydrateRoot.unmountComponentAtNode: Removed in favor ofroot.unmount().ReactDOM.findDOMNode: You can replaceReactDOM.findDOMNodewith DOM Refs.Notable Changes
React
<Context>as a provider: You can now render<Context>as a provider instead of<Context.Provider>.useDeferredValueinitial value argument: When provided,useDeferredValuewill return the initial value for the initial render of a component, then schedule a re-render in the background with thedeferredValuereturned.useMemoanduseCallbackwill now reuse the memoized results from the first render, during the second render. Additionally, StrictMode will now double-invoke ref callback functions on initial mount.React DOM
TypeScript Changes
The most common changes can be codemodded with
npx types-react-codemod@latest preset-19 ./path-to-your-react-ts-files.ReactChild(replacement:React.ReactElement | number | string)ReactFragment(replacement:Iterable<React.ReactNode>)ReactNodeArray(replacement:ReadonlyArray<React.ReactNode>)ReactText(replacement:number | string)VoidFunctionComponent(replacement:FunctionComponent)VFC(replacement:FC)prop-types:Requireable,ValidationMap,Validator,WeakValidationMapcreate-react-class:ClassicComponentClass,ClassicComponent,ClassicElement,ComponentSpec,Mixin,ReactChildren,ReactHTML,ReactSVG,SFCFactoryuseRef: The initial argument is now required to matchuseState,createContextetcuseRef()are now always mutable instead of sometimes being immutable. This feature was too confusing for users and conflicted with legit cases where refs were managed by React and manually written to.ReactElementtyping: The props of React elements now default tounknowninstead ofanyif the element is typed asReactElementJSXnamespace is removed to improve interoperability with other libraries using JSX. Instead, the JSX namespace is available from the React package:import { JSX } from 'react'useReducertypings: MostuseReducerusage should not require explicit type arguments.For example,
All Changes
React
useActionState()hook to update state based on the result of a Form Action (#27270, #27278, #27309, #27302, #27307, #27366, #27370, #27321, #27374, #27372, #27397, #27399, #27460, #28557, #27570, #27571, #28631, #28788, #29694, #29695, #29694, #29665, #28232, #28319 by @acdlite, @eps1lon, and @rickhanlonii)use()API to read resources in render (#25084, #25202, #25207, #25214, #25226, #25247, #25539, #25538, #25537, #25543, #25561, #25620, #25615, #25922, #25641, #25634, #26232, #26536, #26739, #28233 by @acdlite, @MofeiZ, @sebmarkbage, @sophiebits, @eps1lon, and @hansottowirtz)useOptimistic()hook to display mutated state optimistically during an async mutation (#26740, #26772, #27277, #27453, #27454, #27936 by @acdlite)initialValueargument touseDeferredValue()hook (#27500, #27509, #27512, #27888, #27550 by @acdlite)element.refaccess (#28348, #28464, #28731 by @acdlite)<Context>to mean<Context.Provider>(#28226 by @gaearon)info,group, andgroupCollapsedin StrictMode logging (#25172 by @timneutkens)useSyncExternalStore()hydration in StrictMode (#26791 by @sophiebits)componentWillUnmount()in StrictMode (#26842 by @tyao1)useState()anduseReducer()initializer functions in StrictMode (#28248 by @eps1lon)useId()in StrictMode (#25713 by @gnoff)act()no longer checksshouldYieldwhich can be inaccurate in test environments (#26317 by @acdlite)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 becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.