Kvoti / redux-rest

Automatically create Redux action constants, action creators, and reducers for your REST API
MIT License
180 stars 11 forks source link

Reasoning between x_items and x_collection? #6

Open jimbofreedman opened 8 years ago

jimbofreedman commented 8 years ago

If I had been doing this, I would have, for each API, used x.items and x.collection instead. Could you tell me a little bit about why you chose this way? I'm considering changing it for my own use but I thought I'd ask because I'm sure there's a great reason I shouldn't.

mallison commented 8 years ago

Actually I think using attributes makes sense, and is probably more consistent with the rest of the API which has a lot of this.that.other.

It was quite late on that I split out the object and collection actions and there was no deep thinking behind the underscore.

On 7 December 2015 at 15:24, Jimbo Freedman notifications@github.com wrote:

If I had been doing this, I would have, for each API, used x.items and x.collection instead. Could you tell me a little bit about why you chose this way? I'm considering changing it for my own use but I thought I'd ask because I'm sure there's a great reason I shouldn't.

— Reply to this email directly or view it on GitHub https://github.com/Kvoti/redux-rest/issues/6.

jimbofreedman commented 8 years ago

Ok - I will make this change sometime soon and send you a pull request

(this will of course break the code of anybody else who is using it, so what you do with the pull request is up to you... :))

mallison commented 8 years ago

Ok, great.

(In truth I'm not quite sure still about the rest of the api. I did do some DDD to see which variants appealed but it might be there's a neater/clearer/easier way.)

On 7 December 2015 at 15:54, Jimbo Freedman notifications@github.com wrote:

Ok - I will make this change sometime soon and send you a pull request

— Reply to this email directly or view it on GitHub https://github.com/Kvoti/redux-rest/issues/6#issuecomment-162565102.