redux-subscribe icon indicating copy to clipboard operation
redux-subscribe copied to clipboard

Possible to hook this up to Redux store?

Open skwny opened this issue 6 years ago • 0 comments

Hi, I'm trying to use this in a way where I can subscribe directly to my Redux store (I work with state mainly thru store and not props). Is this even possible?

Have been trying for a couple of hours now but not got it working. What I would like to do is in my components:

import * as rsub from 'redux-subscribe'

const local = rsub(store.getState());

local.subscribe('foo', 'bar', localAction);

function localAction(path, prev, next) {
	console.log('check out my new data: ', next);
}

skwny avatar Feb 02 '19 18:02 skwny