Skip to content

Instantly share code, notes, and snippets.

@ColeMurray
Created October 22, 2015 04:32
Show Gist options
  • Save ColeMurray/9d50e8324765f5ec0357 to your computer and use it in GitHub Desktop.
Save ColeMurray/9d50e8324765f5ec0357 to your computer and use it in GitHub Desktop.
A header wrapper in react
import React from 'react'
import TodoTextInput from './TodoTextInput.react'
class Header extends React.Component {
constructor(props) {
super(props)
}
onSave(text) {
console.log(text)
}
render() {
const pHolder = "Todos"
return (
<div>
<h2>Todo List</h2>
<TodoTextInput onSave={this.onSave.bind(this)} placeholder={pHolder} />
</div>
)
}
}
export default Header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment