cloudflare / cloudflare/stream-react

Multiple rerenders before changing the videoId causes unknown error occured message

オープン
#76 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
198
フォーク
30
PR マージ指標
30日以内にマージされた PR はありません

説明

We found that on a large application, if react rerenders 3-7 times just after page load and the videoId changes inbetween, the player shows an unknown error message and continues to do so every time you change the videoId after that
this means that there's no way to recover from an error like this without unmounting the component and remounting it which isn't really a good solution

I created a reproducable repo here https://github.com/Floffah/cloudflare-stream-error and deployed it so you can test
Make sure to set your network tab to a slightly slower network throttling setting (e.g. Fast 3G)

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

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

調査の方向性

リンクされた再現用リポジトリから始め、ネットワークを Fast 3G に制限してアプリケーションを実行し、その後 videoId を変更しながら React の再レンダリングを複数回再現します。プレーヤーが unknown-error 状態に入り、そこに留まるまでの流れを追跡します。videoId を変更したときに、コンポーネントをアンマウントして再マウントせずに復旧できれば完了です。

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

評価

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

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

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