Skip to content

Instantly share code, notes, and snippets.

@goodviber
Created April 6, 2018 12:10
Show Gist options
  • Select an option

  • Save goodviber/e75e520c46dc704804c2c2c2fa46de3c to your computer and use it in GitHub Desktop.

Select an option

Save goodviber/e75e520c46dc704804c2c2c2fa46de3c to your computer and use it in GitHub Desktop.
self evoking switch function in jsx view
<td>
{(() => {
switch(array.od.stage) {
case "Ready To Pick":
return <button
onClick={() => this.handleShow(array.od.id)}
>
Start Picking
</button>;
case "Being Picked":
return <button>Start Picking</button>;
default:
return null;
}
})()}
</td>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment