developit / developit/htm

Shouldn’t multiple root elements become a fragment?

オープン
#175 コメント 8 件 リアクション 7 件 担当者 0 名 GitHub で見る
discussion has fix question
主要言語
JavaScript
スター
9k
フォーク
181
PR マージ指標
30日以内にマージされた PR はありません

説明

This works for me:

```js
return html`
<${React.Fragment}>

Quiz


${entriesUi}


<${Summary} entries=${entries} />

`;
```

If I don’t wrap the fragment around the roots, I’m getting this error:

> Warning: Each child in a list should have a unique "key" prop.

(That is, HTM seems to return an Array and not a fragment.)

If my suggestion doesn’t make sense, then it may be helpful to support the `<>...` syntax for fragments.

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

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

評価

この issue はまだ評価されていません。

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

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