6

using Redux Thunk, first log 'OK' is OK, but process doesn't go to second console.log.

Anyone knows what's wrong? Thank you

export const postTweet = (body) => {
  console.log('OK')
  return dispatch => {
    console.log('NO LOG')
  }
}
Otani Shuzo
  • 1,118
  • 1
  • 11
  • 22

1 Answers1

6

You should do dispatch(postTweet(body)). just calling postTweet like postTweet(body) from component doesn't the trick.

Otani Shuzo
  • 1,118
  • 1
  • 11
  • 22