Skip to content

Instantly share code, notes, and snippets.

@bryceosterhaus
Last active June 2, 2016 23:03
Show Gist options
  • Save bryceosterhaus/1db469baa4f3e9f4db1ef7e0bc4cf2c0 to your computer and use it in GitHub Desktop.
Save bryceosterhaus/1db469baa4f3e9f4db1ef7e0bc4cf2c0 to your computer and use it in GitHub Desktop.
getDiv() {
return (
<div>
{"hi im a div"}
</div>
);
}
return (
{true &&
<div>
<div>top</div>
{this.getDiv()}
</div>
}
)
// Not the same as
return (
{true &&
<div>
<div>top</div>
<div>
{"hi im a div"}
</div>
</div>
}
)
//actual result
<div>
hi im a div
</div>
<div>
<div>top</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment