jamesplease / redux-resource

3kb resource management for Redux
https://redux-resource.js.org
MIT License
237 stars 28 forks source link

Possibility to use dedupe on redux-resource-xhr? #430

Closed svobik7 closed 5 years ago

svobik7 commented 5 years ago

Hi there, first of all thank you for great library.

I am using redux-resource with redux-resource-xhr and trying to solve how to make it work with request deduplication.

I found you published fetch-dedupe library which is great but I think it is not "applicable" to redux-resource-xhr.

Is this feature on your ROADMAP or do you have any idea how to solve this?

jamesplease commented 5 years ago

@svobik7 sorry for the late reply! At the moment you would need to write your own implementation of redux-resource-xhr to take advantage of fetch-dedupe.

I started this over in https://github.com/jamesplease/redux-resource/pull/412/files , which uses the native fetch API rather than fetch-dedupe, but given the API similarities between the two, it shouldn't be hard to adapt it.

Hope that helps!