Given this: https://github.com/vasanthk/react-bits/blob/master/patterns/18.conditionals-in-jsx.md What about something like this: ```jsx const sampleComponent = () => { const basicCondition = flag && flag2 && !flag3; const obj = { 'flag4': 'Blah', 'flag5: 'Meh' }; if (basicCondition) { return {obj[flagName] || Herp} } return Derp }; ```
Activity
cytrowski commentedon Nov 12, 2017
@angelogulina nice :D
Going further:
However I prefer using
condfromlodashin such a case ;)angelogulina commentedon Nov 13, 2017
@cytrowski, honestly I didn't think about
cond.Good idea, thanks!