TypeError: store.getState is not a function

Hey, guys. I dived into React-Redux Beginners friendly guide, following the steps in the tutorial. However, I have got an error and I cannot understand what is wrong.

TypeError: store.getState is not a function

(anonymous function)


16 | }; 17 | }, [store]); 18 | var previousState = useMemo(function () {> 19 | return store.getState(); | ^ 20 | }, [store]); 21 | useEffect(function () { 22 | var subscription = contextValue.subscription;

Yes, here it is

This one

Yeah, it works in the beginning. Just follow the next few steps. Error occurs after connecting the store to the app

It does. And you don’t have this error with my code, am I right?

I even started following this tutorial again from scratch, and still having the same issue

Finally everything works fine

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.