bug: `Channel` remounts its `children` when changing channels
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 62/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
まず、再現手順で説明されている Channel コンポーネントと setActiveChannel の使用箇所を見つけます。マウントをログに記録する子コンポーネントを使ってチャンネルの切り替えを再現し、次に子が再マウントされる理由を追跡して、チャンネルの切り替えに対するカバレッジを追加します。アクティブなチャンネルが変わっても子がマウントされたままになれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Any children inside of Channel get remounted when switching channels
To Reproduce
Steps to reproduce the behavior:
- Include any component inside of
Channel:<Channel><Component /></Channel> - Switch to another active channel (via
setActiveChannel - Notice inner component remounts
Expected behavior
Children of Channel do not remount.
Example repro code
const Component = () => {
useState(() => {
console.log("Component mount");
});
return null;
}
// stream client and channelId (string) passed in
const Example = ({ channelId, streamClient }) => {
const { setActiveChannel } = useChatContext();
useEffect(() => {
if (!streamClient) return;
const channel = streamClient.channel("messaging", channelId);
setActiveChannel(channel);
}, [streamClient, setActiveChannel, channelId]);
return (
<Channel>
<Component />
</Channel>
);
};
Package version
- stream-chat-react: 13.14.4
- stream-chat-css:
- stream-chat-js: 9.38.0
Desktop (please complete the following information):
- OS: MacOS
- Browser: Chrome and Safari
- 主要言語
- TypeScript
- スター
- 845
- フォーク
- 297
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
GetStream/stream-chat-react のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 73/100
GetStream/stream-chat-react#3311 ·
メンテナーはふだん 1 日以内に返信
-
bug released on @rc status:confirmed
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
GetStream/stream-chat-react#3279 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status: unconfirmed
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
GetStream/stream-chat-react#2863 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status:confirmed
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
GetStream/stream-chat-react#2652 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status: unconfirmed
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
GetStream/stream-chat-react#2647 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
GetStream/stream-chat-react の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openclaw/openclaw#168089 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
✨ enhancement needs-discussion
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inference対応中かも @alok-108 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
microsoft/playwright#43263 ·
メンテナーはふだん 1 日以内に返信
-
area:studio type:security
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信