Skip to content

Instantly share code, notes, and snippets.

@gusttavocaruso
Last active August 28, 2021 02:59
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 gusttavocaruso/8da31f6ea421d78b670db5c56116ce51 to your computer and use it in GitHub Desktop.
Save gusttavocaruso/8da31f6ea421d78b670db5c56116ce51 to your computer and use it in GitHub Desktop.

Função padrão para salvar valores adicionados em um input

React.js

  handleChange({ target }) {
    const { name, value } = target;
    this.setState({ [name]: value });
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment