redux-subs
This package implements the declarative Subscriptions pattern seen in the Elm architecture to be used in Redux.
npm install redux-subs
What is a subscription?
const sub = { // setup and start const socket = // dispatch at will socket // return a way to stop return socket}
How to declare them?
// declarative subscriptionsconst subs = state === 'listening' ? socket: sub : {}
How do I start?
const store =