Quick Start doesn't produce working project
See original GitHub issueWhat docs page needs to be fixed?
- Section: Tutorials
- Page: Redux Toolkit Quick Start
What is the problem?
Following the instructions on the page results in a non-functional project.
I’m using the React template on codesandbox.io and the quick start results in a project that errors out with state.counter is undefined
in src/features/counter/Counter.js
.
If I change the selector in Counter.js to work around the undefined member, I get this error in the console: “Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.” but the documentation says that combineReducers
is called by configureStore
for me, so I don’t have to.
The quick start source code also makes reference to a Counter.module.css
file that is not created by following the tutorial.
The example code at the end is way more elaborated than the quick start, and it also appears to be outdated.
I’m brand new to Redux, so I don’t know what Redux wants from me at this point, and that’s quite off-putting.
What should be changed to fix the problem?
Fix the Quick Start so that someone who hasn’t seen Redux in their life can follow it and get it to work on first try.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
No worries, glad this got sorted out!
FYI we’ve also got a
#redux
channel in the Reactiflux Discord ( https://www.reactiflux.com ), which is a great place to come by and ask questions.Well, damn. I thought I moved that file, and somehow it got copied, and I was editing and importing the wrong one without realising. I was just blind to which file was being opened and which one was imported, as in my mind I only had one: the one in ‘app’.
The part about Redux DevTools is something I invented while desperate to figure out what was going on. It didn’t help, but somehow, after I added it to the file (which wasn’t even used), DevTools started to work (it was blank before that), adding to the confusion.
Thanks for pointing out my mistake.
Now I can take a deep breath and move to the page you mentioned 👍