Hacker News new | ask | show | jobs
by doque 3539 days ago
How about { data && <Inner person={ data.person }/> } ?
1 comments

If you render a more complex component this introduces another level of indentation. I can see why some people would prefer cleaner code but in my opinion, indenting ifs is a good thing as it increases the readability and allows you to spot if statements faster.
this is why you should be using immutable js. It will not throw errors accessing an object.