Otani Shuzo
Otani Shuzo

Reputation: 1238

Redux Thunk return dispatch not working

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')
  }
}

Upvotes: 6

Views: 2293

Answers (1)

Otani Shuzo
Otani Shuzo

Reputation: 1238

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

Upvotes: 6

Related Questions