Created
May 25, 2019 00:07
-
-
Save ogabrielguerra/47734d1c6936f292ca30b9e7d2ca6ad4 to your computer and use it in GitHub Desktop.
REACT | Compose a new object from Component State
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
const states = this.state.proposalOptions; | |
let gathered = {}; | |
Object.keys(states).map((key)=>{ | |
gathered[key] = this.state.proposalOptions[key]; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment