react-component / react-component/trigger

Bug: React - Cannot update a component (`HotReload`) while rendering a different component (`TriggerWrapper`)

オープン
#495 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
391
フォーク
245
PR マージ指標
30日以内にマージされた PR はありません

説明

It seems that upgrading to the latest react verion and nextjs version following bug occurs:

intercept-console-error.js:56 Cannot update a component (`HotReload`) while rendering a different component (`TriggerWrapper`). To locate the bad setState() call inside `TriggerWrapper`, follow the stack trace as described in https://react.dev/link/setstate-in-render

This is the stack trace:


error	@	intercept-console-error.js:56
scheduleUpdateOnFiber	@	react-dom-client.development.js:14254
dispatchReducerAction	@	react-dom-client.development.js:7112
eval	@	hot-reloader-client.js:432
handleClientError	@	use-error-handler.js:50
error	@	intercept-console-error.js:53
elementRefGetterWithDeprecationWarning	@	react.development.js:446
TriggerWrapper	@	TriggerWrapper.js:19
react-stack-bottom-frame	@	react-dom-client.development.js:22339
renderWithHooks	@	react-dom-client.development.js:5731
updateForwardRef	@	react-dom-client.development.js:7736
beginWork	@	react-dom-client.development.js:9988
runWithFiberInDEV	@	react-dom-client.development.js:544
performUnitOfWork	@	react-dom-client.development.js:14986
workLoopSync	@	react-dom-client.development.js:14816
renderRootSync	@	react-dom-client.development.js:14794
performWorkOnRoot	@	react-dom-client.development.js:14288
performWorkOnRootViaSchedulerTask	@	react-dom-client.development.js:15843
performWorkUntilDeadline	@	scheduler.development.js:44

Note that this happens in a nextjs environment (in combo with ant design)

trigger version: 2.2.5
antd: 5.22.2
nextjs: 15.03
react: 18.3.1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

trigger 2.2.5、antd 5.22.2、Next.js 15.03、React 18.3.1 を使用する Next.js 環境で警告を再現します。TriggerWrapper.js:19 のスタックトレースと、そこから参照されている hot-reloader-client.js および use-error-handler.js のエントリから開始します。警告が再現され、その原因が特定され、回帰テストによって警告が発生しなくなったことが確認されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
nextjs, react, typescript
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。