Something I've found helpful managing conditional logic (i.e. if (true) { do thing }), is that it's easier to write, read and understand if you make the conditional variable truthy. I hope that makes sense, but as an example:
{!user ? null : <BabyProgress/>}
becomes
{user ? <BabyProgress/> : null}
and actually in this instance you can use a literally true or false variable to render just the thing you need:
I love your use of
<Layout/>
! It's great.Something I've found helpful managing conditional logic (i.e.
if (true) { do thing }
), is that it's easier to write, read and understand if you make the conditional variable truthy. I hope that makes sense, but as an example:becomes
and actually in this instance you can use a literally
true
orfalse
variable to render just the thing you need:but this would just be up to your preferences.