React: dispatch is not a function

1. Question

clipboard.png

2.

clipboard.png

clipboard.png

3. Expect the dispatch printed out by
to be a simple (e) {return t.dispatch (liftAction (e)), e c)), e}
. What"s the problem?

Mar.19,2022


your dispatch is obviously passed into this method. Why don't you call dispatch to have a look at the debugging output?

if (result) {
  console.log(dispatch) // 
  dispatch(changeLogin())
}
...
Menu