Skip to content

Commit

Permalink
Docs: update data package README (#17878)
Browse files Browse the repository at this point in the history
Add a paragraph in Comparison with Redux section, explaining that 
async side-effects solutions are built-in.
  • Loading branch information
adekbadek authored Nov 14, 2020
1 parent e24ac3e commit 884ff88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ The data module shares many of the same [core principles](https://redux.js.org/i

The [higher-order components](#higher-order-components) were created to complement this distinction. The intention with splitting `withSelect` and `withDispatch` — where in React Redux they are combined under `connect` as `mapStateToProps` and `mapDispatchToProps` arguments — is to more accurately reflect that dispatch is not dependent upon a subscription to state changes, and to allow for state-derived values to be used in `withDispatch` (via [higher-order component composition](/packages/compose/README.md)).

The data module also has built-in solutions for handling asynchronous side-effects, through [resolvers](#resolvers) and [controls](#controls). These differ slightly from [standard redux async solutions](https://redux.js.org/advanced/async-actions) like [`redux-thunk`](https://github.com/gaearon/redux-thunk) or [`redux-saga`](https://redux-saga.js.org/).

Specific implementation differences from Redux and React Redux:

- In Redux, a `subscribe` listener is called on every dispatch, regardless of whether the value of state has changed.
Expand Down

0 comments on commit 884ff88

Please sign in to comment.