Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/whole-bikes-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/react-router': patch
---

direct export of CatchBoundary class component, remove function wrapper
11 changes: 1 addition & 10 deletions packages/react-router/src/CatchBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ import { wrapInNonRouteComponentContext } from './nonRouteComponentContext'
import type { ErrorRouteComponent } from './route'
import type { ErrorInfo } from 'react'

export function CatchBoundary(props: {
getResetKey: () => unknown
children: React.ReactNode
errorComponent?: ErrorRouteComponent
onCatch?: (error: Error, errorInfo: ErrorInfo) => void
}) {
return <CatchBoundaryImpl {...props} />
}

class CatchBoundaryImpl extends React.Component<{
export class CatchBoundary extends React.Component<{
getResetKey: () => unknown
children: React.ReactNode
errorComponent?: ErrorRouteComponent
Expand Down
Loading