Skip to content

Enhance ReactClass to support more Perf functions #4521

@gfogle

Description

@gfogle

Currently, ReactClass just loops through lifecycle methods when being created and attaches to prototype of Constructor function or sets to null.

I think the ReactPerf and ReactDefaultPerf would benefit from having ReactClass do an if (__DEV__) check during this phase and re-route lifecycle methods through ReactPerf.measure.

This would allow more advanced metrics down the line about lifecycle methods being executed. I think I have a PR ready if this is something that should be in core; which I think it is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions