Skip to content

Instantly share code, notes, and snippets.

@maluta
Last active December 28, 2017 11:44
Show Gist options
  • Save maluta/9345b41a7902a7e52acb801ad4712771 to your computer and use it in GitHub Desktop.
Save maluta/9345b41a7902a7e52acb801ad4712771 to your computer and use it in GitHub Desktop.

Input

This has an delay problem :(

this.state = { k:'' };

<input onChange = {(e) => this.entradaUsuario(e.target.value)} /> 

entradaUsuario(v) {
  this.setState({k:v});
} 

this has not a delay problem

this.state = { k:'' };

<input onChange = { (e) => this.setState({k:e.target.value}) } />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment