investtools / extensible-duck

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Access selectors from action creators

nratter opened this issue · comments

Hey fellas... really loving this tool!

Is there any way to access selectors inside action creators?

Hi @nratter. Glad to know you are enjoying this lib!

I'm on vacation without my computer. @aga5tya, could you please help @nratter?

@nratter since creators function call is invoked before selectors, they won't have access to it, swapping this line with the next line should give you selectors access.

Just curious, is there a specific case you'd want to use selectors in action creator's ? thunks maybe ?

@aga5tya not a specific case. But, in order to use selectors in action creators with this lib, they have to be passed in as parameters. It may be nice to be able to access the selectors directly.

@akelmanson awesome! thanks!