Defer the evaluation of children for specific React components without function syntax.
In your babel config:
plugins: [
["react-deferred-children", {
"elements": [ "Loader", "If" ]
}]
]
In:
<If condition={false}>
<ComponentThatWillBreakUnderCertainConditions />
</If>
Out:
<If condition={false}>
{() => <ComponentThatWillBreakUnderCertainConditions />}
</If>