-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
TypeError: Cannot read property 'getChildContext' of undefined when trying to switch to Preact existing project (with redux) #2069
Comments
iirc there was an issue with |
I can only add up that I am getting the same error without Redux. It's just freezing my tab. |
@ppozniak are you using react-hot-loader too? |
Yes I do. |
Hmm seems like |
@andrewiggins @ppozniak @marvinhagemeister hmm, very interesting. I'll investigate this one further. Appreciate your answers here. |
I can confirm that this issue caused by conflicts with I'll try to find out what exactly conflicting, and maybe create same issue for |
Meanwhile, it looks like if you want to use hotloader alias for |
Having the same problem here, is there any workaround to get react-hot-loader to work with Preact? |
FYI: We're close to getting an official fast-refresh plugin for Preact out. It supports not just component HMR but also hooks. We'll announce it sometime in the coming weeks and need a bit of time to resolve remaining issues. This is doable without extending options like proposed in the react-hot-loader repo above. |
Ahoy.
I am currently trying to switch existing project (react v16.8 + react-redux v7.1) to preact (trying v10) by using
preact
&preact/compat
aliases in webpack config.And encountering next problem on application start ->
caused by usage of
Provider
component (fromreact-redux
).Code itself ->
Following to the
preact-module
code it says thatProvider
has an 'undefined' value as 'this' (create-context
file, https://github.com/preactjs/preact/blob/master/src/create-context.js#L14).Same code works well without Provider so can't figure out what is wrong. Demo from this repo, with redux
Provider
usage works as well.Any information will be much appreciated.
The text was updated successfully, but these errors were encountered: