-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Problems with context #79
Comments
Are you using a |
There is nothing we can help you with unless you provide a full example.
No, React merges context. |
@gaearon sorry for not closing an issue, I've already find the solution. |
What was it? |
const router = (
<Router history={history}>
// routes here
</Router>
);
<Provider>
{() => router}
</Provider> Was not obvious for me that Router component itself have to be declared in the function body. |
Got it! It's documented: https://github.com/rackt/react-redux#could-not-find-store-in-either-the-context-or-props |
@gaearon I guess here is another problem. I thougt that if I place router variable as and return value from function inside Provider it would be similar to put tag inside Provider. I think its all about how JSX work. Dont know how to describe it better. Hope you can :) |
Okay. I think we'll just wait for React 0.14 because the problem will go away with it. |
I'm trying to build my own components on top of react-redux. I'm stuck with the following error:
My components need to have their own childContext. Mb I need somehow to merge childContext of my components with one from react-redux?
The text was updated successfully, but these errors were encountered: