-2
    TypeError: getState is not a function

  32 | 
  33 | export const removeFromCart = (product) => (dispatch, getState) => {
> 34 |      getState() 
  35 |     const cartItems = getState().cart.cartItems.slice().filter(
  36 |         (x) => x._id !== product._id
  37 |         );`enter code here`
View compiled
▶ 29 stack frames wer
Progman
  • 16,827
  • 6
  • 33
  • 48
Timgo
  • 1
  • 2

1 Answers1

0

You need assing getState to a var like this:

const state = getState() ;
Cássio Lacerda
  • 1,554
  • 1
  • 12
  • 14