developit / developit/htm

Easier for JSX users to spot missing `${...}`

Đang mở
#208 2 bình luận 6 reaction 0 người được giao Xem trên GitHub
debugging discussion enhancement proposal
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ả

I've been using `htm` for a while now (it's awesome btw), every once in a while though I switch back from a project using JSX and end up writing `` instead of `<${Avatar} />` or `

` instead of `
`.

It is sometimes hard to spot why something's failing, because it fails quietly, doesn't throw an error or obvious warning. I believe (and please correct me) the library could check for attributes starting with `/^{/` or elements starting with `/^[A-Z]/` and warn the user about their potential error.

Because you're very unlikely to have an element with either of the above, it seems like something that could potentially be enabled by default. Or available by default in a developer build.

There is a little demo showing the error at .

Thoughts?

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.