Skip to content

v1.0.1

Compare
Choose a tag to compare
@pveyes pveyes released this 06 Aug 06:00
· 13 commits to master since this release
4d660d5

Fix non-boolean attribute treatment #138

Previously these HTML trigger react warning because it satisfies boolean attribute value requirement (value equals to attribute name, or empty string).

<img alt="alt" />
<div class=""></div>

It's rendered into

// jsx equivalent
<img alt={true} />
<div className={true}></div>

Now htmr will validate whether the attribute is boolean attribute before using boolean value. If not, the attribute will simply be forwarded as is

Example above now rendered as

// jsx equivalent
<img alt="alt" />
<div className=""></div>