Redux bindings inspired by Domain Driven Design principles.
Along the lines of react-redux
, redux-ddd
provides Redux bindings for generic domain-specific components.
When dealing with asynchronicity and side-effects, redux-ddd
enables an alternative approach to popular libraries such as redux-thunk
and redux-saga
.
npm install --save redux-ddd
The redux-ddd
library provides a @Connect
decorator that extends the semantic of self-defined custom methods onStateUpdate
and onAction
. The former will be called every time the observed state updates, the latter will be called when an action is dispatched to the store.
The @Connect
ed components are augmented with the Redux store dispatch
function, and with the custom mapping of the state they need.
Take a look at the quick-start by example to have an immedate feeling on how the code would look like.