Skip to content

Instantly share code, notes, and snippets.

@bkonkle
Last active January 12, 2017 19:41
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 bkonkle/c9f09a24c304898d590393d11c653b18 to your computer and use it in GitHub Desktop.
Save bkonkle/c9f09a24c304898d590393d11c653b18 to your computer and use it in GitHub Desktop.
JSX Presentational Component
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