Skip to content

Instantly share code, notes, and snippets.

@kastigar
Last active February 4, 2018 14:14
Show Gist options
  • Save kastigar/a1bf0471ffee8fd6430134282fd26677 to your computer and use it in GitHub Desktop.
Save kastigar/a1bf0471ffee8fd6430134282fd26677 to your computer and use it in GitHub Desktop.
Inline JSX condition
function Menu(props) {
return (
<div>
<div class="toggle" />
{props.opened && (
<nav>
<ul>
{props.items.map(renderMenuItem)}
</ul>
</nav>
)}
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment