Closed maxs15 closed 8 years ago
I found out the issue.
By calling the fetch action directly inside my get action the dispatch will call the onFetch
method of the store, onGet
won't be called
get(id) {
return this.fetch({get: 'app/' + id});
}
The solution is to pass the dispatch to the fetch
method, that way onGet
will be called
get(id) {
return (dispatch) => this.fetch({get: 'app/' + id}, dispatch);
}
It looks like the dispatch is not performed when it is called in a inherited method. I've added a test on my fork (https://github.com/maxs15/alt/commit/d61160fec1c643120980d51c8a5823c41b21284e) @goatslacker any idea what could be the issue ?
Thanks