developit / developit/htm

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

未关闭
#208 2 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
debugging discussion enhancement proposal
主要语言
JavaScript
星标
9k
派生
181
PR 合并指标
30 天内没有已合并 PR

描述

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?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。