Skip to content

There is no context in preact/compat/PureComponent and it breaks other libraries like react-recurly #4268

@Silviu-Marian

Description

@Silviu-Marian

Issue brought over from here.

We're using a library that extends PureComponent, and calls super() with both props and context but the preact version does not support context. Updating to the latest Preact version does not resolve the issue.

This is the problematic component:
https://github.com/preactjs/preact/blob/main/compat/src/PureComponent.js

Here is the implementation from React:
https://github.com/facebook/react/blob/v16.14.0/packages/react/src/ReactBaseClasses.js#L129

No need for demos or repro repos, should be obvious in the source.
Is this something that you guys can fix? Or is it intentionally left out?

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