-
Notifications
You must be signed in to change notification settings - Fork 134
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
with redux #72
Comments
put that line before any component rendering
…---Original---
From: ***@***.***>
Date: Thu, May 27, 2021 18:56 PM
To: ***@***.***>;
Cc: ***@***.***>;
Subject: [magicismight/react-native-root-siblings] with redux (#72)
report: Error: could not find react-redux context value; please ensure the component is wrapped in a <Provider>
why?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
But you need 2 providers, one for main app, one for rootsiblings. setSiblingWrapper(
// This provider is for elements inside root-siblings
)
const App = () => {
// This rendering function will invoke frequently. So *DO NOT* put any one-time use function here.
return (
<RootSiblingParent>
<Provider
// .......
// This provider is for elements not inside root-siblings
>
<App />
</Provider>
</RootSiblingParent>
)
} |
so there is another way seems more simpler: render() {
return (
<Provider store={store}>
<RootSiblingParent>
<App />
</RootSiblingParent>
</Provider>
)
} |
@wiseqingyang Unfortunately, that wont work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
report:
Error: could not find react-redux context value; please ensure the component is wrapped in a <Provider>
why?
The text was updated successfully, but these errors were encountered: