Files
copilotkit__copilotkit/docs/snippets/use-client-callout.mdx
Ariel Weinberger 0dfb539d2d Swap out old docs for new docs (#693)
* swap docs

* fix build error

---------

Co-authored-by: Fuma Nama <fuma-nama@noreply.com>
2024-10-04 14:13:08 +02:00

12 lines
428 B
Plaintext

### Specify `"use client"` (Next.js App Router)
<Callout type="info">
This is only necessary if you are using Next.js with the App Router.
</Callout>
```tsx title="YourComponent.tsx"
"use client"
```
Like other React hooks such as `useState` and `useEffect`, this is a **client-side** hook.
If you're using Next.js with the App Router, you'll need to add the `"use client"` directive at the top of any file using this hook.