Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Proposal: Dim Components with Parens in Name #676

Closed
@gaearon

Description

@gaearon

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions