|
|
|
|
|
by Bromlife
3765 days ago
|
|
I accomplish this in Redux with a simple: componentDidMount() {
item = store.getState().get('item') // Get function from Immutable.js
this.unsubscribe = store.subscribe(() => {
let nowItem = store.getState().get('item');
if (item !== nowItem) {
this.forceUpdate();
item = nowItem;
}
});
}
Someone may have a better solution, but I think this works fine for my needs. The internet is full of people dissuading redux users from subscribing to actions. |
|