Skip to content

Instantly share code, notes, and snippets.

@ovpv

ovpv/App.js

Created May 12, 2019
Embed
What would you like to do?
inside Data.forEach
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