Reactive-redux ; npm package to get reactive data sources from a Redux Store

Hi Everyone,
during my (still pending) rewrite from Blaze to React+Redux, i have very often depended on a data source which needed to be both accessed by react through a redux store and by blaze through a reactive variable or Session.
For those accustomed to Tracker, the solution is to create a Tracker.Dependency for this specific variable, put a changed() in the appropriate action creators, and a depend() in the computation/autorun/blaze helper.
This is a bit painful, and you end up with a lot of manualy created Tracker.Dependency which you must carefuly track/set in the right place

Until now :wink: Meet reactive-redux, a mini npm module which will allow to create a reactive variable from the part of the redux tree you are interested in, with minimal syntax.
https://www.npmjs.com/package/reactive-redux

Install with usual npm install reactive-redux --save

Comments welcome !

3 Likes

I updated the module to add the ability to use a selector in place of the string path (take a look at the new example).

Enjoy :wink: