Skip to content

Shallow renderer does not support React.memo #14807

Closed
@ljharb

Description

@ljharb

Do you want to request a feature or report a bug?
bug

What is the current behavior?
In normal rendering, you can memoize a class-based component: https://jsfiddle.net/586ea3cx/

With the shallow renderer, it seems like you can't: https://jsfiddle.net/odj217Lv/1/

This might be blocking enzymejs/enzyme#1914, in which tests are failing with Cannot call a class as a function. (it's tough to repro stuff with the shallow renderer)

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