Skip to content

Instantly share code, notes, and snippets.

@johnkawakami
Created March 22, 2018 07:45
Show Gist options
  • Select an option

  • Save johnkawakami/f0c843f2412707a81324c2c45ecee1ce to your computer and use it in GitHub Desktop.

Select an option

Save johnkawakami/f0c843f2412707a81324c2c45ecee1ce to your computer and use it in GitHub Desktop.
React function that shouldn't really be written like this
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