Search code examples
htmlreagent

Is there a way to create an HTML attribute without a value in reagent?


Attributes like disabled with no value are called "Boolean attributes" in the HTML spec.

Hiccup allows these, but I found no way of achieving the same result in reagent. The :disabled true syntax in reagent results in disabled="" HTML, which is not the same.


Solution

  • It is impossible to create an attribute without a value, but that's an upstream limitation of React and has nothing to do with Reagent.