Skip to content

fix: surface mapStateToProps errors in connect#2311

Open
louzhedong wants to merge 1 commit into
reduxjs:masterfrom
louzhedong:fix/connect-mapstate-error-boundary
Open

fix: surface mapStateToProps errors in connect#2311
louzhedong wants to merge 1 commit into
reduxjs:masterfrom
louzhedong:fix/connect-mapstate-error-boundary

Conversation

@louzhedong

@louzhedong louzhedong commented Jun 7, 2026

Copy link
Copy Markdown

This makes connect rethrow subscription callback errors during render so mapStateToProps failures can reach an error boundary instead of being swallowed.

Validation:

  • ='C:\Users\Administrator\AppData\Local\npm-cache_npx\ebaba8b9e55fd0a9\node_modules\node\bin\node.exe'; & 'C:\Program Files\nodejs\node_modules\corepack\dist\yarn.js' vitest test/components/connect.spec.tsx --run

@codesandbox-ci

codesandbox-ci Bot commented Jun 7, 2026

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@aryaemami59 aryaemami59 changed the title fix: surface mapStateToProps errors in connect fix: surface mapStateToProps errors in connect Jun 7, 2026
@louzhedong

Copy link
Copy Markdown
Author

Quick follow-up in case this is easier to review now than the other connect PR:

This change is intentionally narrow. It only re-surfaces mapStateToProps subscription errors during render so existing error boundaries can catch them, without changing the successful update path.

If you'd prefer this handled in a different layer of connect, or want the regression coverage trimmed to a smaller repro, I'm happy to adjust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant