Open
Description
What version of React, ReactDOM/React Native, Redux, and React Redux are you using?
- React: 18.2
- ReactDOM/React Native: react-dom 18.2
- Redux: 4.2.0
- React Redux: 8.0.2
What is the current behavior?
https://codesandbox.io/s/gifted-architecture-wr4f86?file=/src/App.js
- Have a code that can cause an error in mapStateToProps, e.g.
const mapStateToProps = (state) => {
return {
foo: state.foo.length, // when foo is undefined, causes an error
};
};
- Dispatch an action that changes the state so that it causes the error above
dispatch(updateFoo(undefined));
- Rerender doesn't happen, no errors emitted in console, componentDidCatch catches nothing. The error is swallowed.
What is the expected behavior?
This issue makes debugging code that's using react-redux really hard.
The expected behaviour is that the error is visible in console.
It worked fine in 7.2.8: https://codesandbox.io/s/charming-firefly-coekps
Which browser and OS are affected by this issue?
Windows, latest Chrome here. Probably affects all browsers.
Did this work in previous versions of React Redux?
- Yes
Metadata
Metadata
Assignees
Labels
No labels