Download / redux-apis

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

Should we reserve the namespace for sub-objects in our state? #5

Closed athanclark closed 8 years ago

athanclark commented 8 years ago

In the .getState() function, there's a call to this.__link(this.__parent.getState()) - likewise, in link()'s default definition, if child isn't defined (like in the call earlier), yet the parent object will be an object and the this parameter is still bound to the child, which does have the .__parent parameter, which then takes this code path.

Because we're only supplying the parent's .__state property to the child's .__link(), it would expect it's name to exist in the state of the parent.

How should this work / how should I be doing this?

Download commented 8 years ago

@athanclark Can you have a look at the updated documentation on link and see if it clears up your questions? If not, feel free to re-open.