Created
April 25, 2018 16:33
-
-
Save wendelnascimento/203e08dc9f05d98cd11b1cda24fe4852 to your computer and use it in GitHub Desktop.
Example of using idx in place of chained ifs
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 location = idx(this.state, _ => _.person.infos.location); | |
return ( | |
<span>{location}</span> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment