Skip to content

Instantly share code, notes, and snippets.

@glocore
Last active September 27, 2017 19:13
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 glocore/4e5945f8320aabc805ea1aa7a2055c60 to your computer and use it in GitHub Desktop.
Save glocore/4e5945f8320aabc805ea1aa7a2055c60 to your computer and use it in GitHub Desktop.
SyntheticEvent Example
import React, {Component} from 'react'
import _ from 'lodash'
export default class App extends Component {
onChange(event) {
console.log(event.target.value)
}
render() {
return (
<div>
<input type="text" onChange={_.debounce(this.onChange, 500)}/>
</div>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment