Open
Description
First thing, I really like the API of this lib, however I've noticed that for every composed component adopts
adds a discrete number of intermediary components that substantially increase the React tree depth.
const Composed = adopt({
one: ({ render }) => <One render={render} />,
two: ({ render }) => <Two render={render} />,
});
// becomes
<Composed>
<Adopt(one)(two)>
<Adopt(one)>
<Adopt>
<one>
<One>
<two>
<Two>
// children
This not only makes debugging the React tree harder, but if you start using it extensively to create several dozens of combined components the tree simply "explodes" and you might start having performance problems too.
It would be great if adopt
could do it's magic in just one layer:
<Composed>
<One>
<Two>
// children
Metadata
Metadata
Assignees
Labels
No labels