The wrong export in redux/examples/counter-ts/src/features/counter/counterSlice.ts
xiaojiuwo1993 opened this issue · 1 comments
xiaojiuwo1993 commented
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
EskiMojo14 commented
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