developit / developit/htm

Shouldn’t multiple root elements become a fragment?

Đang mở
#175 8 bình luận 7 reaction 0 người được giao Xem trên GitHub
discussion has fix question
Ngôn ngữ chính
JavaScript
Star
9k
Fork
181
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.