-
-
Save neosaurrrus/5f35a5b32e3cd51d3c16c2a39cf174d7 to your computer and use it in GitHub Desktop.
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
updateGrocery = (key, updatedGrocery) => { | |
const groceries = {...this.state.groceries} | |
groceries[key] = updatedGrocery | |
this.setState ({groceries}) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment