question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WithStore: Cannot read property 'state' of undefined

See original GitHub issue

Using 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
VitaliiTsurkancommented, May 8, 2019

Hello @rafaelderolez I have the same problem, could you provide your solution prease?

0reactions
rafaelderolezcommented, Dec 6, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found