I find spacer.gif or even this "inlined gif" solution much more elegant and straitforward - better than bothering with div/span element and correct styling.
And Josh could easily implement that react component with gif!
<span style="display:inline-block;width:1px;height:1px"></span>