Skip to content

Instantly share code, notes, and snippets.

@seriousManual
Last active July 6, 2016 14:40
Show Gist options
  • Save seriousManual/66d24eb23b3b76f1a3491f2014dd549e to your computer and use it in GitHub Desktop.
Save seriousManual/66d24eb23b3b76f1a3491f2014dd549e to your computer and use it in GitHub Desktop.
i know this might be mitigated with react >=15 but I'm bound to 0.14.8 due to IE8 support.
var example1 = <div>{amount} <SomeComponent/></div>
would render to:
<div>
<span><<myAmount>>
<span> </span> //<---- a new span just for the blank is added
<span>output of SomeComponent</span>
</div>
------------
var example2 = <div>{amount + ' '}<SomeComponent/></div>
would render to:
<div>
<span><<myAmount>> </span> //<---- here the blank belongs to the first span
<span>output of SomeComponent</span>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment