Simple if condition helper for JSX.
This module is an implementation of this tweet. It's highly recommended to read the whole thread, since you may find out that you don't actually need this module.
npm install --dev if.jsx
import If from 'if.jsx'
// ...
return <div className='foobar'>
{If(showHeader) (
<h1>Header</h1>
)}
<div className='body'>body</div>
</div>
condition
: any javascript expressionchildren
: react nodes to render
MIT