Skip to content

Commit bf1a094

Browse files
committed
docs: improve nextjs docs
1 parent 33915ea commit bf1a094

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/pages/docs/advanced/nextjs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ imageTitle: Next.js and BlockNote
88

99
BlockNote is a component that should only be rendered client-side (and not on the server). If you're using Next.js, you need to make sure that Next.js does not try to render BlockNote as a server-side component.
1010

11-
Make sure to use BlockNote in a [Client Component](https://nextjs.org/docs/getting-started/react-essentials#client-components). You can do this by creating a separate file for your component (**make sure this sits outside of your `pages` or `app` directory**), and starting that with `"use client";` [directive](https://react.dev/reference/react/use-client):
11+
Make sure to use BlockNote in a [Client Component](https://nextjs.org/docs/getting-started/react-essentials#client-components). You can do this by creating a separate file for your component (**make sure this sits outside of your `pages` or `app` directory, for example `components/Editor.tsx`**), and starting that with `"use client";` [directive](https://react.dev/reference/react/use-client):
1212

1313
```typescript jsx
1414
"use client"; // this registers <Editor> as a Client Component
@@ -36,7 +36,7 @@ You can import the component we just created above using `next/dynamic` in your
3636
```typescript jsx
3737
import dynamic from "next/dynamic";
3838

39-
const Editor = dynamic(() => import("./editor"), { ssr: false });
39+
const Editor = dynamic(() => import("../components/Editor"), { ssr: false });
4040

4141
function App() {
4242
return (

0 commit comments

Comments
 (0)