Children's key is missing

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

@DanielHara がすでに取り組んでいます。

2024年1月30日 から。

  • #841 @DanielHara による — オープン

評価

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

調査の方向性

提示されたReactElement-to-JSXの例を再現し、子のReact要素がどのようにシリアライズされるかを追跡する。このissueには、最初に取りかかるソースファイルやテストの指定がない。生成されたJSXにRadioButton上のkey="1-1-0"が含まれ、示されているpropsと親のkeyが維持されれば完了とする。

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

説明

bug unconfirmed

Issue: There is something wrong with children's key.
Example: The expected output should be

<RowItem key="1-1">
    <RadioButton 
        key="1-1-0" 
        checked={false} 
        disabled={false} 
        label="auto" 
        name="1-1" 
        tabIndex="0"
    />
</RowItem>

But I got an output without RadioButton's key:

<RowItem key="1-1">
    <RadioButton 
        checked={false} 
        disabled={false} 
        label="auto" 
        name="1-1" 
        tabIndex="0"
    />
</RowItem>

I am sure the radio button element is correct:

      { '$$typeof': Symbol(react.element),
        type: [Function: RadioButton],
        key: '1-1-0',
        ref: null,
        props: 
         { label: 'auto',
           tabIndex: '0',
           disabled: false,
           checked: false,
           name: '1-1' },
        _owner: null,
        _store: {} }

Any suggestions about this?

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

環境構築

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

はじめの一歩

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

algolia/react-element-to-jsx-string のほかの issue

algolia/react-element-to-jsx-string の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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