From 36387cf09a10c6e4900c4892bff485c4fcb28b9a Mon Sep 17 00:00:00 2001 From: omeralpi Date: Thu, 17 Jul 2025 17:31:58 +0300 Subject: [PATCH] docs: note about client component requirement --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 7dd9080..75e4380 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,24 @@ const FormSchema = z.object({ }); ``` +## Known Issues + +### Server-Side Rendering (SSR) + +The `PhoneInput` component must be used in a **Client Component**. If you see this error: + +``` +TypeError: Super expression must either be null or a function +``` + +Add `"use client"` to the top of your file: + +```tsx +"use client"; +``` + +This is required because `react-phone-number-input` uses browser APIs that aren't available during SSR. + ## Documentation You can find out more about the API and implementation in the