Download / redux-apis

Helpers for creating Redux-aware APIs.
Creative Commons Attribution 4.0 International
11 stars 0 forks source link

Why reference `this` in `apiLink`? #4

Closed athanclark closed 8 years ago

athanclark commented 8 years ago

The only occurrence of using apiLink is in the course that a custom link-er wasn't provided to link. Therefore, we should avoid using the this reference as it convolutes the meaning, and evidently is only used on the child object.

I'll submit a pull request after verifying all tests still work.

Download commented 8 years ago

Can you elaborate on this? Are you still working on this?

I had some mind-boggling going on when designing the linker function and apiLink... It has been refactored many times. There is a weird dependency going on, because at the time link is called, the parent object does not yet have a reference to the child. So apiLink can only determine the name of the child after link has returned. I am pretty happy with how it works now, but I am open to alternatives so let me know.

Download commented 8 years ago

@athanclark Let me know if you want to reopen.