4 ms·
How about { data && <Inner person={ data.person }/> } ?
by doque 10y ago
How about { data && <Inner person={ data.person }/> } ?
- ponyous 10y agoIf 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.
- zackify 10y agothis is why you should be using immutable js. It will not throw errors accessing an object.
- deleted 10y ago[deleted]