Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Silviu-Marian opened this issue Jan 27, 2024 · 0 comments · Fixed by #4269

Comments

@Silviu-Marian
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant