Proposal: Dim Components with Parens in Name #676
Description
Inspired by #503, I want to propose a super simple heuristic for making HOCs less prominent.
How about we just dim the components in the tree that have (
or )
in their names? These are always HOCs, as people commonly use X(Y)
convention like Connect(App)
, Relay(FeedItem)
, or withStyles(Button)
. You can’t accidentally put parens into the name so it’s always intentional. HOCs that don’t adhere to this convention could easily adapt to it.
We wouldn’t completely hide the HOCs (at least, I’d like to start without it) because it obscures the data flow. But I think even making them dim in the tree would make a visual difference. Does anyone want to prototype this?
I don’t know if dimming will be helpful in practice or not but I’d like to experiment with it. If not, then we could add a “Hide Wrappers” checkbox that also uses (
and )
as a heuristic.