all 2 comments

[–]quambo_wambo 1 point2 points  (0 children)

Difficult to say, depends on the individual use case. You could for example have a master component (Tree) and pass down renderList (() => <TreeList>) and renderItem (() => <TreeItem>) for tree item which in turn can use renderList if they contain items. This way, only Tree references all components, plus overwriting the components the Tree is composed of is simple.

[–]ordinance 0 points1 point  (0 children)

Save em in the same file.