Created
May 12, 2019 13:37
-
-
Save ovpv/641aaa58e355cdc9a527f5a0acb290dc to your computer and use it in GitHub Desktop.
inside Data.forEach
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
Data.forEach(([name, price]) => { | |
this.setState(prevstate => ({ | |
data: { | |
...prevstate.data, | |
[name]: | |
} | |
})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment