Last active
January 12, 2017 19:41
-
-
Save bkonkle/c9f09a24c304898d590393d11c653b18 to your computer and use it in GitHub Desktop.
JSX Presentational Component
This file contains 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
import React, {Component} from 'react' | |
import {newTodo} from './NewTodo.purs' | |
class NewTodoView extends Component { | |
render () { | |
const {addTodo, nextId} = this.props | |
return ( | |
<header className="header"> | |
<h1>todos</h1> | |
<input className="new-todo" | |
key={nextId} | |
placeholder="What needs to be done?" | |
autoFocus | |
name="newTodo" | |
onKeyPress={addTodo} /> | |
</header> | |
) | |
} | |
} | |
export default newTodo(NewTodoView) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment