-
Notifications
You must be signed in to change notification settings - Fork 56
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>
// childrenThis 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>
// childrenreicheltp, gavinmeier25 and kobawan
Metadata
Metadata
Assignees
Labels
No labels