If I write this in JSX and render it with React:
<div data-foo>Hello world</div>
...the resulting DOM looks like this:
<div data-foo="true">Hello world</div>
Why?
For comparison, when I use standardised boolean attributes (e.g. <button disabled>OK</button>
), this doesn't happen – the resulting DOM is the same as the JSX. Why are boolean data-attibutes treated differently?