Created
March 22, 2018 07:45
-
-
Save johnkawakami/f0c843f2412707a81324c2c45ecee1ce to your computer and use it in GitHub Desktop.
React function that shouldn't really be written like this
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
| const TitleList = (props) => | |
| ( | |
| <ul key="tlul"> | |
| { | |
| props.list ? ( | |
| props.list.map( (item) => ( | |
| <li key={item.url} | |
| className='list__item' | |
| onClick={ (evt) => { props.openPreview(item.url); } }> | |
| {item.title} | |
| </li> | |
| )) | |
| ) : ("Trying to load the sitemap...") | |
| } | |
| </ul> | |
| ); | |
| // Once again... some write-only code in LISPABAB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment