这是indexloc提供的服务,不要输入任何密码
Skip to content

Feature request: SimpleMemoComponent fast path for React.memo with custom arePropsEqual #33793

@barryam3

Description

@barryam3

#13903 added the SimpleMemoComponent tag and created the fast path for components created by React.memo where component is just a function and the default props comparison is used. The PR description says:

We could make it so that this also works with custom comparer but that means we have to go through one extra indirection to get to it. Maybe it's worth it, donno.

This is a feature request for making the fast path work with a custom props comparison.

I'm use custom props comparison extensively. I'm struggling to measure the overhead of the slow path -- here's my attempt -- but I'm concerned it may be significant. This also has the side effect of creating an extra node in React DevTools, which makes debugging harder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions