Open nganhkhoa opened 5 years ago
I modified the function and it works. Should I make a pull request?
onModel(model) {
if (typeof model.effects === 'undefined') return;
...
}
The above patch doesn't let loading change.
I tried with yield delay(5000)
but loading is still false.
Edit:
Never mind, this was due to @rematch/loading
not working on dispatch({})
.
If you will make Pull Request, I'll merge it. But I'm paying your attention that this package is incomplete and not works in most cases of using redux-saga. Dont use it, I think its impossible to completely combine Saga and Rematch approaches.
Rematch loading doesn't have effects so module.effects is undefined. And
Object.keys(effects)
will throw an error.You can see as I debug in firefox in the picture below.
I think we should return fast if the given modules doesn't have effects.