-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Switch Redux logic setup to use Redux Toolkit #637
Comments
Thanks for opening this issue Mark and thanks for all that you’ve done in Redux land. I’m definitely down with this, but, It’d be good to get @coryhouse and @kwelch chime in on this as well. |
FWIW, I've cloned the repo and am currently playing around with trying to do the conversion. Honestly, the biggest problem atm appears to be the heavy reliance on Switched out the store config only took me about 5 minutes. I may just try adding an equivalent |
Another point in favor of switching to RTK: the current setup adds |
PR is up. I made some additional stylistic-ish changes. I'd appreciate it if you'd consider them, but you may ignore them if desired. Also, there's some prior discussion on the folder structure at #146 . |
Hi, I'm a Redux maintainer. I'd like to offer a couple suggestions.
Is your feature request related to a problem? Please describe.
The current Redux example implementation shows use of reducers with "hand-written" immutable update logic, and has a somewhat complex store configuration. In addition, the project currently uses a "folder-by-type" folder structure.
Describe the solution you'd like
The project should switch to using the official Redux Toolkit package to implement the Redux logic.
The project should also consider switching to a "feature-folder" or "ducks" folder structure, rather than a "folder-by-type" structure.
Additional context
Redux Toolkit is our new official, opinionated, batteries-included toolset for efficient Redux development. It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once without writing any action creators or action types by hand.
We are recommending RTK as the default standard way to write Redux logic. Partly related to that, we are also recommending that developers should prefer to use "feature folders" or "ducks" rather than "folder-by-type". (Reference: the work-in-progress Redux "Style Guide" docs page.)
Since many developers will be starting their projects using
react-slingshot
, it would be beneficial if Redux Toolkit was included as part of the default project setup, as it will greatly simplify the application code they write.The text was updated successfully, but these errors were encountered: