Why use Redux Thunk

Why use Redux Thunk, then you can do something like this:

ReadableAPI.getCategories().then((categories)=>{
      console.log('after getCategories', categories)

      this.props.dispatch(addCategories(categories))
    })

Is it not more straightforward and the same thing is achieved?

+4
source share
2 answers

, redux-thunk . , - ( - "" ). , backbone, React. , , / . html, . html, Redux .

, , , view business, . , React Redux, , , , - Redux, , , -.

+1

Redux Thunk , , , , .

0

Source: https://habr.com/ru/post/1688443/


All Articles