3 ms·
^^^ Apples to oranges: <DoStuff args={...}><DoMoreStuff args={...}> <DoEvenMoreStuff args={...}/> </DoMoreStuff> </DoStuff> vs DoStuff(DoMoreStuff(Do
by 3dGrabber 3y ago
^^^ Apples to oranges:
<DoStuff args={...}><DoMoreStuff args={...}> <DoEvenMoreStuff args={...}/> </DoMoreStuff> </DoStuff>
vs
DoStuff(DoMoreStuff(DoEvenMoreStuff()))
Both of them you would split into indented lines when they become too long. And 1 becomes too long much faster.
Also with 2 you can do
const todo = DoMoreStuff(DoEvenMoreStuff());
DoStuff(todo);
where as with 1 you cannot.
- mitt_romney_12 3y agoWith JSX you can do const todo = <DoMoreStuff args={...}><DoEvenMoreStuff args={...}/></DoMoreStuff>; <DoStuff args={...}>{todo}</DoStuff>