You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/tdesign-react/site/docs/getting-started.en-US.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,13 @@ module.exports = {
88
88
89
89
### How to use in React 19
90
90
91
-
If you need to use TDesign React in React 19, please install version `[email protected]`. Since it cannot simultaneously support React 16–19, we will soon provide a branch version for long-term compatibility with React 19.
91
+
If you need to use it with React 19, please install at least `[email protected]`.
92
+
93
+
```js
94
+
importReactfrom"react";
95
+
import { createRoot } from"react-dom/client";
96
+
import"tdesign-react/es/_util/react-19-adapter";
97
+
```
92
98
93
99
### How to use React with Next.js
94
100
@@ -101,6 +107,8 @@ When using Next.js, you need to adjust how you use these components.
101
107
102
108
import { Button } from'tdesign-react/lib/';
103
109
import'tdesign-react/dist/tdesign.css';
110
+
// Use it in React19 and introduce the following line
111
+
import"tdesign-react/lib/_util/react-19-adapter";
104
112
```
105
113
106
114
In addition, the code exported by the `lib` package is written in `es6` and is located in the `node_modules`. It will be skipped by Webpack during compilation, and you need to configure it in `next.config.js`
0 commit comments