Skip to content

Commit 0cf1ae0

Browse files
committed
Add console.error back to client side error boundary
1 parent b87dadf commit 0cf1ae0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/remix-react/errorBoundaries.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ export class RemixErrorBoundary extends React.Component<
7070
* When app's don't provide a root level ErrorBoundary, we default to this.
7171
*/
7272
export function RemixRootDefaultErrorBoundary({ error }: { error: Error }) {
73+
// Only log client side to avoid double-logging on the server
74+
React.useEffect(() => {
75+
console.error(error);
76+
}, [error]);
7377
return (
7478
<html lang="en">
7579
<head>

0 commit comments

Comments
 (0)