Skip to content

Commit 76239e8

Browse files
committed
docs: add document for nextjs integration
1 parent b89bc61 commit 76239e8

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Framework",
3+
"position": 5,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Framework"
7+
}
8+
}

website/docs/framework/nextjs.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
sidebar_position: 1
3+
title: Nextjs
4+
---
5+
6+
## Use in Nextjs
7+
8+
### transpile source code
9+
10+
As nextjs will not auto transpile modules in `node_module`. so you should manual assign it should be process in build stage.
11+
12+
- [Reference](https://nextjs.org/docs/architecture/nextjs-compiler#module-transpilation)
13+
14+
15+
16+
### Only render in client side
17+
18+
as tushan is a pure client library and not ready for SSR, so just keep everything is in client render will avoid much problem
19+
20+
```ts
21+
'use client'
22+
```
23+
24+
- [Reference](https://nextjs.org/docs/app/api-reference/directives/use-client)
25+
26+
### Support not cool in nextjs 15
27+
28+
As nextjs 15 is design for react 19, so its will have some issue between react 18 and 19.
29+
30+
Unfortunately, the component library arco design used by tushan does not fully support react 19.
31+
32+
So at least you need use your own `Message`/`Notification` component rather than `tushan`'s those component.

0 commit comments

Comments
 (0)