developit / developit/htm

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

オープン
#208 コメント 2 件 リアクション 6 件 担当者 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?

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

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

調査の方向性

Start by reviewing the failure cases described in the issue and the linked htm-suggestion demo, then inspect htm's existing handling of uppercase elements and brace-like attributes. Done means there is a clear, documented warning or developer-mode behavior for the reported JSX-to-HTM mistakes, with coverage for both examples.

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

評価

技術スタック
javascript
領域
frontend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

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

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