Skip to content

Instantly share code, notes, and snippets.

@vianhanif
Created September 27, 2016 03:37
Show Gist options
  • Save vianhanif/400404eabbc2d4bd49c54f040609e4e5 to your computer and use it in GitHub Desktop.
Save vianhanif/400404eabbc2d4bd49c54f040609e4e5 to your computer and use it in GitHub Desktop.
inline react condition
const Item = React.createClass({
render: function(){
return(
<div>
{(()=>{
// if-else, switch, while, any condition
})()}
</div>
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment