5 ms·
Though you're also adding indirection. Not always worth it when you're just trying to do some conditional logic next to the code/components that it's related t
by hombre_fatal 5y ago
Though you're also adding indirection.
Not always worth it when you're just trying to do some conditional logic next to the code/components that it's related to.
Ideally we have the tools to decide when to add indirection ourselves instead being forced to do it to deal with complexity. You could also see this in callback-hell when we'd flatten callback trees with indirection—the tree looked flatter in the editor but we just moved code around. async/await gave us the tools to decide when we actually wanted it.
- eyelidlessness 5y agoHow is that indirection? These are semantically identical: {renderIf(foo)} <RenderIf foo={foo} /> The latter is a bit more verbose, sure, but it’s both more idiomatic and a better optimization target.