-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Incompatibility with Redux #77
Comments
Can you create a codesandbox/codepen example of this? Which version of React do you use? |
I'm using Gatsby with React 16.6.3. Here the codesandbox https://codesandbox.io/s/jn8y0zmj23 but there's a strange error of cross-origin – anyway, the code should generate the error I was talking about. At the moment the workaround that I found is to put the Provider of Redux as Child of Stage, in this way: ...
<Stage {...props}>
<Provider store={store}>
<Section />
</Provider>
</Stage>
... |
Hey, I'm hitting something like this as well, I think. I'm not using Redux, but I bet my case is the same -- and I bet #55 is the same too. Context just doesn't seem to pass through If I comment out My components down the tree immediately start receiving context from the |
It seems that the Context is not passed through the reconciler indeed. I guess it has something to do with the Will look into this next week, hopefully I can manage it to work. :) If someone has pointers where to look, please let me know! Thanks |
Hi there! Just for the record. It happened the same to me. Same scenario than @lostfictions |
I know, this one has high priority I won’t have time to fix this issue within the next 2 weeks, but please feel free to create a PR with the implementation. Thanks! |
After looking at the
@inlet correct me if I'm wrong. In any case. Due react-reconcilier is not documented and it's though to go through, I decided to attach some useful links related to it: |
The I have an hour to see if I can come up with a solution. |
We may want to open an issue in the React repo in this case? |
Contexts are not passed through the reconcilers with the new Context API. Create a wrapper component that consumes the context and provides it again in the new reconciler context: https://codesandbox.io/s/volq0qj7 This solution is also pointed out here: michalochman/react-pixi-fiber#93. I'll close this issue now as it is not related to this lib but to React Context API. |
This might be a stupid question, but how do I pass multiple Contexts with the bridge? |
Any update on this? Running into this issue with React Context api. |
In case anyone else stumbles here from Google/etc, This links to the following React issue: Which seems to have been closed by this PR: Which seems to have been included in the React I haven't looked any deeper into things that that yet, but at least in theory, I would expect that the React side of this bug/issue/weirdness should be fixed now. So it may 'just work'. |
This issue still exist on:
Any updates or walkaround? |
@Jayatubi I fixed my issue having the provider inside the
|
Thanks for the solution it works. BTW I just found a doc mentioned another solution and it works too: https://pixijs.io/pixi-react/context-bridge/ |
I added Redux in my app but it doesn't seem to work; if I try to retrieve data from store in a children of I receive this error:
Could not find "store" in the context of "Connect(Section)". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to Connect(Section) in connect options.
The text was updated successfully, but these errors were encountered: