jamesplease / redux-resource

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

Request reducer #327

Open jamesplease opened 6 years ago

jamesplease commented 6 years ago

In v3, there may be a new reducer that stores request information separately from any resource. The request info on resources is not going away. It will just be duplicated for now.

This issue is for discussions around this new feature.

Current open questions:


I'm not 100% certain that I need this reducer to be separate. Tying the requests to resources works well enough. And a <Resource/> component could just have the resourceName specified there, as well...

I'll need to think more on this


After reading the roadmap, I think I may be able to hold off on this change for now. Scoping by resource isn't the worst given that most RESTful APIs tie endpoints to one resource. And as I've demonstrated with the v3 work so far, it is easy to add in later in a non-breaking way. Maybe I should skip this change for v3...

jamesplease commented 6 years ago

Resolved in #346 .

Answers to questions:

Is it too confusing to have resource and request plugins?

Maybe, but the request plugins probably won't be used as frequently, so I'm going to minimize their presence in the documentation.

Should requests store list info as well?

No

jamesplease commented 6 years ago

I'm still undecided on the API for interacting with this slice, so I'm going to push it back to 3.1