The wrong export in redux/examples/counter-ts/src/features/counter/counterSlice.ts
koujiangheng opened this issue · comments
Prior Issues
The wrong export make counter-ts example error compile, in file https://github.com/reduxjs/redux/blob/master/examples/counter-ts/src/features/counter/counterSlice.ts
line 84
Should change export default counterSlice.reducer;
to export default counterReducer = counterSlice.reducer;
What is the current behavior?
TypeError _reactRedux.useDispatch.withTypes is not a function
Steps to Reproduce
open official example
What is the expected behavior?
There should be no error showing.
Environment Details
version 8.0.2
the export you've suggested is invalid syntax, and it's unrelated to the issue at hand
what's actually happening is that the example is using a feature from React Redux 9.1.0 while depending on 8.0.2, which indeed needs fixing