Skip to content

Instantly share code, notes, and snippets.

a,
a:active,
a:focus {
outline: none;
}
@brukh
brukh / examples.js
Last active September 26, 2016 20:50
Stateless Functional Components
// 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) => (
@brukh
brukh / index.html
Created September 26, 2016 20:49
stateless functional components
<div id='app'></div>