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

bug: `Channel` remounts its `children` when changing channels

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

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
react, typescript
領域
frontend

調査の方向性

まず、再現手順で説明されている Channel コンポーネントと setActiveChannel の使用箇所を見つけます。マウントをログに記録する子コンポーネントを使ってチャンネルの切り替えを再現し、次に子が再マウントされる理由を追跡して、チャンネルの切り替えに対するカバレッジを追加します。アクティブなチャンネルが変わっても子がマウントされたままになれば完了です。

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

説明

bug status:confirmed WIP

Describe the bug

Any children inside of Channel get remounted when switching channels

To Reproduce

Steps to reproduce the behavior:

  1. Include any component inside of Channel: <Channel><Component /></Channel>
  2. Switch to another active channel (via setActiveChannel
  3. 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

環境構築

はじめの一歩

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

GetStream/stream-chat-react のほかの issue

GetStream/stream-chat-react の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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