20 lines
335 B
Plaintext
20 lines
335 B
Plaintext
---
|
|
description: Rules for implementing error handling in Next.js 14 using error.tsx files.
|
|
globs: **/app/error.tsx
|
|
---
|
|
- For error handling (in error.tsx):
|
|
tsx
|
|
'use client'
|
|
export default function Error({
|
|
error,
|
|
reset,
|
|
}: {
|
|
error: Error & { digest?: string }
|
|
reset: () => void
|
|
}) {
|
|
return (
|
|
|
|
|
|
|
|
);
|
|
} |