Skip to content

Instantly share code, notes, and snippets.

@neosaurrrus
Created September 24, 2018 05:58
Show Gist options
  • Save neosaurrrus/52a6e6ab3f7164c344516da369bf8bda to your computer and use it in GitHub Desktop.
Save neosaurrrus/52a6e6ab3f7164c344516da369bf8bda to your computer and use it in GitHub Desktop.
addProfile = person => {
const profiles = {...this.state.profiles}
profiles[`profile${Date.now()}`] = profile; //Profile here is the output of the form
this.setState({profiles}) // this setsState for the profiles property.
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment