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: docs/recipes/react-support.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,12 @@ For the fastest way to get started, use the React component starter template. Th
10
10
npx create-tsdown@latest -t react
11
11
```
12
12
13
+
To use React Compiler, you can quickly set up a project with the dedicated template:
14
+
15
+
```bash
16
+
npx create-tsdown@latest -t react-compiler
17
+
```
18
+
13
19
## Minimal Example
14
20
15
21
To configure `tsdown` for a React library, you can just use a standard `tsdown.config.ts`:
@@ -64,3 +70,32 @@ export default defineConfig({
64
70
```
65
71
66
72
:::
73
+
74
+
## Enabling React Compiler
75
+
76
+
React Compiler is an innovative build-time tool that automatically optimizes your React applications. React recommends that library authors use React Compiler to precompile their code for improved performance.
77
+
78
+
Currently, React Compiler is available only as a Babel plugin. To get started, you can either scaffold the `react-compiler` template as shown above, or integrate it manually:
0 commit comments