Skip to content

Instantly share code, notes, and snippets.

@oreqizer
Created December 2, 2016 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oreqizer/11fb1bdb5bba30edf8ea335a6ba3990b to your computer and use it in GitHub Desktop.
Save oreqizer/11fb1bdb5bba30edf8ea335a6ba3990b to your computer and use it in GitHub Desktop.
An example of a very dumb todo component.
import React from 'react';
import Todo from '../../../universal/containers/Todo';
const doneStyle = {
textDecoration: 'line-through',
};
const notDoneStyle = {
textDecoration: 'none',
};
const DumbTodo = ({ todo }) => (
<div
className="TodoItem"
style={todo.done ? doneStyle : notDoneStyle}
>
<span className="TodoItem-text">{todo.text}</span>
</div>
);
export default DumbTodo;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment