Need advice about which tool to choose?Ask the StackShare community!
redux-thunk vs reselect: What are the differences?
redux-thunk: Thunk middleware for Redux. Redux Thunk middleware allows you to write action creators that return a function instead of an action. The thunk can be used to delay the dispatch of an action, or to dispatch only if a certain condition is met. The inner function receives the store methods dispatch and getState as parameters; reselect: Selector library for Redux. Simple “selector” library for Redux (and others) inspired by getters in NuclearJS, subscriptions in re-frame and this proposal from speedskater.
redux-thunk and reselect can be primarily classified as "State Management Library" tools.
redux-thunk and reselect are both open source tools. It seems that reselect with 15K GitHub stars and 526 forks on GitHub has more adoption than redux-thunk with 12.6K GitHub stars and 682 GitHub forks.
Quizlet, LendingHome, and Gogo are some of the popular companies that use redux-thunk, whereas reselect is used by BlaBlaCar, LendingHome, and Captiv8. redux-thunk has a broader approval, being mentioned in 10 company stacks & 19 developers stacks; compared to reselect, which is listed in 7 company stacks and 6 developer stacks.
Pros of redux-thunk
- Easy6