Skip to content

Instantly share code, notes, and snippets.

Last active June 17, 2017 11:46
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Example stateless React Component
import React, { PropTypes } from 'react'
const Todo = ({ onClick, completed, text }) => (
textDecoration: completed ? 'line-through' : 'none'
Todo.propTypes = {
onClick: PropTypes.func.isRequired,
completed: PropTypes.bool.isRequired,
text: PropTypes.string.isRequired
export default Todo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment