Skip to content

Instantly share code, notes, and snippets.

@anthonyshort
Created June 4, 2015 17:28
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 anthonyshort/4540efdb779ad18d719c to your computer and use it in GitHub Desktop.
Save anthonyshort/4540efdb779ad18d719c to your computer and use it in GitHub Desktop.
const Parent = {
render (component, updateState) {
function onChange () {
updateState({ parentChanged: 'yay' })
}
return <Child onChange={onChange} />
}
}
const Child = {
render ({ props }) {
return <div onClick={props.onchange}>Click</div>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment