Skip to content

Instantly share code, notes, and snippets.

@nesbtesh
Last active August 26, 2016 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nesbtesh/702c78f198f1ea68dcaaf3eb01c87488 to your computer and use it in GitHub Desktop.
Save nesbtesh/702c78f198f1ea68dcaaf3eb01c87488 to your computer and use it in GitHub Desktop.
Usage of render if
import renderIf from '../utils/renderif'
export default class RenderIfExample extends Component {
render() {
var isTrue = true;
return (
<div>
{renderIf(isTrue)(
<h1>I am being rendered</h1>
)}
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment