Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Bad set state in WorkflowStatus component

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

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

frontend/src/components/workflows/WorkflowStatus.tsx の226-234行目から始め、useEffect がある場合とない場合の動作を比較してください。リンクされている React の setState-in-render に関するガイダンスを読み、警告が発生する理由、既存の修正によって何が変わるのか、警告が表示されなくなったことを確認する方法を文書化してください。

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

説明

Mentioned in the documentation
SOLVED: call useEffect to set state so it is changed after render

https://github.com/DiamondLightSource/TomoHub/blob/e8095d9d6aec18d6258a32a3d7205ee438b38066/frontend/src/components/workflows/WorkflowStatus.tsx#L226-L234

If the useEffect is removed the following error occurs:
Warning: Cannot update a component (CropProvider) while rendering a different component (WorkflowStatus). To locate the bad setState() call inside WorkflowStatus, follow the stack trace as described in https://reactjs.org/link/setstate-in-render WorkflowStatus@http://localhost:5173/src/components/workflows/WorkflowStatus.tsx?t=1764062699314:83:24 div div...

Although this is no longer an issue the fix and the core problem are not fully understood.

主要言語
TypeScript
スター
2
フォーク
1
平均マージ
18時間 57分
マージ済み PR(30日)
55

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

DiamondLightSource/ImagingHub のほかの issue

DiamondLightSource/ImagingHub の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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