store.getState is not a function
See original GitHub issueGetting this error and unable to figure out why. Following the instructions as closely as possible:
store.getState is not a function
TypeError: store.getState is not a function
at Object.runComponentSelector [as run] (http://localhost:3000/_next/1505232471916/commons.js:85141:46)
at Connect.initSelector (http://localhost:3000/_next/1505232471916/commons.js:85293:23)
at new Connect (http://localhost:3000/_next/1505232471916/commons.js:85234:15)
at http://localhost:3000/_next/1505232471916/commons.js:29191:18
at measureLifeCyclePerf (http://localhost:3000/_next/1505232471916/commons.js:28972:12)
at ReactCompositeComponentWrapper._constructComponentWithoutOwner (http://localhost:3000/_next/1505232471916/commons.js:29190:16)
at ReactCompositeComponentWrapper._constructComponent (http://localhost:3000/_next/1505232471916/commons.js:29176:21)
at ReactCompositeComponentWrapper.mountComponent (http://localhost:3000/_next/1505232471916/commons.js:29084:21)
at mountComponent (http://localhost:3000/_next/1505232471916/commons.js:2295:35)
at Object._ReactReconciler2.default.mountComponent (http://localhost:3000/_next/1505232471916/commons.js:14921:35)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
React store.getState is not a function - Stack Overflow
This is a typo that generated the error: TypeError: store.getState is not a function. Wrong const store = createStore(()=>[], {} ...
Read more >TypeError: store.getState is not a function in Electron #1056
I think this is your issue: your configureStore function returns an object with properties {store, persistor} , but you're assigning const store ...
Read more >this.props.contextValue.store.getState is not a function". I am ...
I am getting the following error when trying to use connectSearchBox() "TypeError: this.props.contextValue.store.getState is not a function" ...
Read more >TypeError: store.getState is not a function - JavaScript
Hey, guys. I dived into React-Redux Beginners friendly guide, following the steps in the tutorial. However, I have got an error and I...
Read more >Reactjs – Uncaught TypeError: store.getState is not a function
Reactjs – Uncaught TypeError: store.getState is not a function. reactjsredux. In my redux js app (google appengine backend), I get the following warnings ......
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
After struggle a lot, I got the reason.
If you return
store
IngetInitialProps
method, it gonna throw error when client side. you can getstore
object ingetInitialProps
for dispatch some actions, however we should not return that object.@hckrmoon you saved me, was fighting with this for hours. We had a sepearte
store
as in retail store prop being passed that was conflicting.