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

not work with redux toolkit? #80

Open
adenisovgit opened this issue Jan 8, 2020 · 0 comments
Open

not work with redux toolkit? #80

adenisovgit opened this issue Jan 8, 2020 · 0 comments

Comments

@adenisovgit
Copy link

adenisovgit commented Jan 8, 2020

Hi. Trying to use it on rtk-based project.
reducer and actions connected to store. thunk is default in rtk.
rendering

<Provider store={store}>
      <App />
      <Notifs />
    </Provider>

gives a lot of errors:

browser.js:38 Uncaught Invariant Violation: Could not find "store" in either the context or props of "Connect(Notifs)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Notifs)".
    at invariant (webpack:///./node_modules/invariant/browser.js?:38:15)
    at new Connect(Notifs) (webpack:///./node_modules/redux-notifications/node_modules/react-redux/lib/components/connect.js?:132:36)
    at constructClassInstance (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:14204:18)
    at updateClassComponent (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:18413:5)
    at beginWork$1 (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:20186:16)
    at HTMLUnknownElement.callCallback (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:336:14)
    at Object.invokeGuardedCallbackDev (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:385:16)
    at invokeGuardedCallback (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:440:31)
    at beginWork$$1 (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:25780:7)
    at performUnitOfWork (webpack:///./node_modules/react-dom/cjs/react-dom.development.js?:24695:12)
invariant @ browser.js:38
Connect(Notifs) @ connect.js:132
constructClassInstance @ react-dom.development.js:14204
updateClassComponent @ react-dom.development.js:18413
beginWork$1 @ react-dom.development.js:20186
callCallback @ react-dom.development.js:336
invokeGuardedCallbackDev @ react-dom.development.js:385
invokeGuardedCallback @ react-dom.development.js:440
beginWork$$1 @ react-dom.development.js:25780
performUnitOfWork @ react-dom.development.js:24695
workLoopSync @ react-dom.development.js:24671
performSyncWorkOnRoot @ react-dom.development.js:24270
scheduleUpdateOnFiber @ react-dom.development.js:23698
updateContainer @ react-dom.development.js:27103
eval @ react-dom.development.js:27528
unbatchedUpdates @ react-dom.development.js:24433
legacyRenderSubtreeIntoContainer @ react-dom.development.js:27527
render @ react-dom.development.js:27608
eval @ index.jsx:64
eval @ index.js:46
./src/index.js @ main.js:20820
__webpack_require__ @ main.js:20
eval @ client:2
0 @ main.js:20867
__webpack_require__ @ main.js:20
(anonymous) @ main.js:84
(anonymous) @ main.js:87
react-dom.development.js:21843 The above error occurred in the <Connect(Notifs)> component:
    in Connect(Notifs)
    in Provider

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
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

No branches or pull requests

1 participant