investtools / extensible-duck

Modular and Extensible Redux Reducer Bundles (ducks-modular-redux)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

nratter opened this issue · comments

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,
    ))
}