Skip to content

Instantly share code, notes, and snippets.

@antonioiksi
Created November 5, 2017 22:35
Show Gist options
  • Save antonioiksi/68932235eec6478d41b569a7b2b2fd89 to your computer and use it in GitHub Desktop.
Save antonioiksi/68932235eec6478d41b569a7b2b2fd89 to your computer and use it in GitHub Desktop.
clone array is easy: arr.slice(0)
this.setState({
result: this.state.query.slice(0),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment