Created
April 6, 2018 12:10
-
-
Save goodviber/e75e520c46dc704804c2c2c2fa46de3c to your computer and use it in GitHub Desktop.
self evoking switch function in jsx view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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