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
// concise inline example that returns an image tag | |
const UserAvatar = (props) => <img src={props.avatar} /> | |
/* | |
+ logic is contained within a single jsx statement | |
+ making things even more concise you can destructure props and set default values thanks to babel and es6 | |
+ each stateless components recieves props, context, and updater as arguments | |
*/ | |
const UsersAvatarList = ({ data = [] }, context, updater) => ( |
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
<div id='app'></div> |