getLastActionKey doesn't seem to work?
See original GitHub issueHi,
I end up firing a bunch of actions to fetch some resources using:
yield all([put(fetchResource('abc123')), put(fetchResource('abc567'))]);
If fetchResource is a standard redux-saga-requests action I’d think I could prevent it from aborting the abc567
request by formulating my request using the action creator below (I’m using FSA compatible actions) but it still seems to abort my requests. There doesn’t seem to be a test written for request specific getLastActionKey
so maybe this isn’t working as expected?
export const fetchResource = resourceId => ({
type: types.FETCH_RESOURCE,
payload: {
request: {
url: `/resource/${resourceId}`,
},
},
meta: {
resourceId,
getLastActionKey: action => action.type + action.meta.resourceId
},
});
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
getLastActionKey doesn't seem to work? · Issue #239 · klis87/redux ...
Hi, I end up firing a bunch of actions to fetch some resources using: yield all([put(fetchResource('abc123')), put(fetchResource('abc567'))]); ...
Read more >Declarative AJAX requests and automatic network state ...
With redux-requests , assuming you use axios (you could use it with ... There doesn't seem to be a test written for request...
Read more >The redux-requests from klis87 - GithubHelp
createDriver doesn't seem to be exported from redux-saga-requests-axios. i'm developing a project with react-redux-boilerplate as a basis. so to reproduce ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@spacesuitdiver the only thing that comes to my mind is that you use an interceptor and you don’t take into account that you could get array of requests and responses, otherwise each action should be independent on another.
Maybe try to do this batch fetch in a simple project, for example by adjusting fetch example. Then see if it works. If yes, you could use it to simplest possible react native project, I didn’t test it but I guess that it should work there too. But you can never be sure.
@klis87 thanks again, request/response as array was the issue.