-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Undocumented selectors functionality in createSlice
#51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The original inspiration for this is https://github.com/ericelliott/autodux , which has some more complex functionality in its I'd absolutely like to make both the library and the slice/selector functionality more useful, but I've been focused on doing docs build system improvements. (That actually included setting up a new docs site for So, the answers here are that we just haven't poked at it enough, and any stuff that's not documented is because we missed documenting it :) If you've got specific suggestions, please tell us (and file a PR if possible). Also see #41 for some related discussion. |
Thanks! Will do. Looking at this more closely, it's not operating exactly the way I assumed. I'll close now and maybe/hopefully open a PR after doing some battle-testing myself on a current project. My thinking was that some I now see that I extrapolated the current implementation into something it wasn't. Realizing that the intention would be to use the generated slice selector when invoking a specific selector |
FYI: There is still a reference to it in the README.md: A createSlice() function that accepts a set of reducer functions, a slice name, and an initial state value, and automatically generates corresponding action creators, types, and simple selector functions. |
Thanks, fixed. |
Thanks for the great tool! It uncovers some great existing utilities, provides some new ones, and sheds light on some useful idioms.
I had a question regarding
createSlice
. Having used a "ducks" structure previously, this was a great thing to uncover. And, naturally, I wondered why there wasn't an ability to also pass selectors intocreateSlice
. However, I noticed that there is the ability to pass selectors intocreateSlice
but it's undocumented. My only complaint about the functionality as it stands is that it modifies the name of selector. I understand why that happens for actions (and it makes it more readable to boot!), but I don't quite understand why that is needed for selectors.So, two questions:
createSliceSelector
for import?Thanks!
The text was updated successfully, but these errors were encountered: