Last active
September 27, 2017 19:13
-
-
Save glocore/4e5945f8320aabc805ea1aa7a2055c60 to your computer and use it in GitHub Desktop.
SyntheticEvent Example
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 _ 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