Skip to content

Instantly share code, notes, and snippets.

@matiasfha
Created January 24, 2018 01:18
Show Gist options
  • Save matiasfha/769fd32e3b2c68c32224c42b384afdf2 to your computer and use it in GitHub Desktop.
Save matiasfha/769fd32e3b2c68c32224c42b384afdf2 to your computer and use it in GitHub Desktop.
Item functional component
const Item = ( { item, handleItemClick, getItemClassName } ) =>
<div
key={item.id}
className={getItemClassName(item)}
onClick={handleItemClick(item)}
>
<div className="main">{item.lastName}, {item.firstName}</div>
<div className="secondary">
{item.company}
<span className="meta"> (hired: {item.hireDate})</span>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment