investtools / extensible-duck

Modular and Extensible Redux Reducer Bundles (ducks-modular-redux)
MIT License
147 stars 12 forks source link

[1.3.0] Reselect functions don't seem to be composable #16

Closed nratter closed 7 years ago

nratter commented 7 years ago

Accessing test2 works fine, but when you try to access test3, the following code will fail because test2 is returning a type 'Selector' which can't be used as an input in test3.

selectors: {
    test1: state => state.test1,
    test2: new Duck.Selector(selectors => createSelector(
      selectors.test1,
      test1 => test1,
    )),
    test3: new Duck.Selector(selectors => createSelector(
      selectors.test2,
      test2 => test2,
    ))
}