Skip to content

Commit

Permalink
fix(react): resolve error of @suspensive/[email protected] (#1437)
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli authored Feb 16, 2025
1 parent 0019653 commit a974e54
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/angry-cameras-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@suspensive/react": patch
---

chore(react): resolve ErrorBoundary error of @suspensive/react@3.0.0-next.1
1 change: 1 addition & 0 deletions configs/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export const suspensiveReactTypeScriptConfig = tseslint.config(
...reactHooks.configs.recommended.rules,
'react-compiler/react-compiler': 'warn',
'@eslint-react/no-forward-ref': 'off',
'@eslint-react/no-context-provider': 'off',
},
settings: {
react: {
Expand Down
4 changes: 3 additions & 1 deletion packages/react/src/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ class BaseErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState
}

return (
<ErrorBoundaryContext value={{ ...this.state, reset: this.reset }}>{childrenOrFallback}</ErrorBoundaryContext>
<ErrorBoundaryContext.Provider value={{ ...this.state, reset: this.reset }}>
{childrenOrFallback}
</ErrorBoundaryContext.Provider>
)
}
}
Expand Down

0 comments on commit a974e54

Please sign in to comment.