Skip to content

chore(deps): bump react and @types/react - #25

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/multi-7f19880bf6
Open

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/multi-7f19880bf6

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 18, 2026

Copy link
Copy Markdown

Bumps react and @types/react. These dependencies needed to be updated together.
Updates react from 18.3.1 to 19.3.0

Release notes

Sourced from react's releases.

19.3.0 (September 9, 2026)

Below is a list of all new features, APIs, and bug fixes.

Read the React 19.3 release post for more information.

New React Features

New React DOM Features

  • browser(): a new react-dom API that returns a usable which errors during server rendering and resolves in the browser. use(browser()) inside a <Suspense> boundary marks a subtree as browser-only without reporting a recoverable error (@​gnoff: #37143, #37241)
    • Added an onBrowserBailout option to the react-dom/server APIs to observe when a subtree defers to the browser (@​gnoff #37193)

Notable changes

All Changes

React

... (truncated)

Changelog

Sourced from react's changelog.

19.3.0 (September 9, 2026)

New React Features

New React DOM Features

  • browser(): a new react-dom API that returns a usable which errors during server rendering and resolves in the browser. use(browser()) inside a <Suspense> boundary marks a subtree as browser-only without reporting a recoverable error (@​gnoff: #37143, #37241)
    • Added an onBrowserBailout option to the react-dom/server APIs to observe when a subtree defers to the browser (@​gnoff #37193)

Notable changes

All Changes

React

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for react since your current version.


Updates @types/react from 18.3.31 to 19.3.0

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [react](https://github.com/react/react/tree/HEAD/packages/react) and [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react). These dependencies needed to be updated together.

Updates `react` from 18.3.1 to 19.3.0
- [Release notes](https://github.com/react/react/releases)
- [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/react/react/commits/v19.3.0/packages/react)

Updates `@types/react` from 18.3.31 to 19.3.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: react
  dependency-version: 19.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: "@types/react"
  dependency-version: 19.3.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the dependencies Dependency and runtime maintenance label Sep 18, 2026
@ruijayfeng

Copy link
Copy Markdown
Contributor

本地复现了失败并验证了修复方案,供合并参考(未推送分支,diff 可直接套用)。

失败根因

typecheck 三处报错源于 React 19 类型收紧:无参 useRef<T>() 不再合法。但更深的问题是分组不完整:本 PR 把 react/@types/react 升到 19,react-dom 却留在 18——修完 useRef 后 typecheck 能过,运行时 SSR 直接崩

TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
    at node_modules/react-dom/cjs/react-server-dom-.../react-dom-server-legacy.node.development.js

(react-dom 18 读 react 19 已移走的内部结构;tutorial-presentation.test.mjs 稳定复现。)

已验证的最小完整方案

  1. 版本集合补齐:react-dom: ^19.3.0@types/react-dom: ~19.3.0
  2. 两处无参 useRef 改为显式含 undefined(共 2 行;QCodeWorld.tsx:370= undefined 在新类型下无需改动):
- const pickerAbort = useRef<AbortController>()
+ const pickerAbort = useRef<AbortController | undefined>(undefined)
- const current = useRef<TutorialRun>()
+ const current = useRef<TutorialRun | undefined>(undefined)

验证结果(macOS arm64 / Node 26.8.1)

  • yarn typecheck 退出 0
  • yarn build:web 通过
  • node --test packages/qcode-web/tests/*.test.mjs61/61 通过(含 SSR 呈现测试)

类型与测试全绿,但 React 19 是 major 升级,合并前建议照旧跑一次浏览器人工走查。另注:#13 首批将触碰 Tutorial.tsx / QCodeWorld.tsx 同批文件,届时会保持新旧类型双兼容写法。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependency and runtime maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant