WithStore: Cannot read property 'state' of undefined
See original GitHub issueUsing WithStore (with "pure-react-carousel": "^1.19.0",
) results in the following issue:
Uncaught TypeError: Cannot read property 'state' of undefined
at new n (index.es.js?b3e0:formatted:1)
at constructClassInstance (VM127074 react-dom.development.js:11361)
at updateClassComponent (VM127074 react-dom.development.js:14687)
at beginWork (VM127074 react-dom.development.js:15644)
at performUnitOfWork (VM127074 react-dom.development.js:19312)
at workLoop (VM127074 react-dom.development.js:19352)
at HTMLUnknownElement.callCallback (VM127074 react-dom.development.js:149)
at Object.invokeGuardedCallbackDev (VM127074 react-dom.development.js:199)
at invokeGuardedCallback (VM127074 react-dom.development.js:256)
at replayUnitOfWork (VM127074 react-dom.development.js:18578)
```
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Cannot read property 'state' of undefined (pure-react-carousel ...
I am actually an author for Pure React Carousel. WithStore() only works if it is a child of <CarouselProvider />. WithStore accesses React's ......
Read more >What is "TypeError: Cannot read property 'state' of undefined"?
The error message says that you don't have the state property on an undefined object. To decode this, we have to understand the...
Read more >Uncaught TypeError: Cannot read property 'state' of undefined ...
If state is undefined, you may be using WithStore on a component located outside of your <CarouselProvider> tags. <CarouselProvider> // ...
Read more >vuex cannot read properties of undefined (reading 'state')
How do I set up my spec file so that it reads in isAuthenticated from state in store. Open side panel. Vuex Mutation:...
Read more >Cannot read property 'state' of undefined (pure-react-carousel ...
Coding example for the question WithStore: Cannot read property 'state' of undefined (pure-react-carousel)-Reactjs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @rafaelderolez I have the same problem, could you provide your solution prease?
Hey, it’s been a while but I think I was using withStore outside of the carousel provider! I think I brought the provider to a higher level. I can’t say for sure, sorry!