Do you want to request a feature or report a bug?
Bug?
What is the current behavior?
When I server render this: <script src='https://www.googletagmanager.com/gtag/js?id=XXX' async />
The HTML has async="" instead of just async.
Using React 16.1.1 and node 8.9.1.
Is there a way to render <script src='...' async /> rather than <script src='...' async="" />..?
Not sure if browsers treat async="" as true or false.
Not sure if browsers treat async="" as true or false.
React output is correct. By HTML spec, for boolean attributes, not specifying an attribute is the same as specifying it with ='' value.
How difficult would it be to just use the canonical name without a value? They're both semantically identical, but maybe we could save people a few bytes :)
@gaearon Thanks for that...
not specifying an attribute is the same as specifying it with ='' value
I think you mean not specifying an attribute value is the same as specifying it with =''.
@aweary At the moment, using both async and async='async' result in async="", which is fine so long as browsers follow the spec and treat it as true.
How difficult would it be to just use the canonical name without a value?
Happy to review a PR.