Skip to content

Commit 73e9fb5

Browse files
authored
Merge pull request #62 from reactjs/sync-2bfa7a62
Sync with react.dev @ 2bfa7a6
2 parents 2116aa5 + 8dd0dba commit 73e9fb5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/content/learn/react-compiler.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ In addition to these docs, we recommend checking the [React Compiler Working Gro
121121
Prior to installing the compiler, you can first check to see if your codebase is compatible:
122122

123123
<TerminalBlock>
124-
npx react-compiler-healthcheck@latest
124+
npx react-compiler-healthcheck@experimental
125125
</TerminalBlock>
126126

127127
This script will:
@@ -143,7 +143,7 @@ Found no usage of incompatible libraries.
143143
React Compiler also powers an eslint plugin. The eslint plugin can be used **independently** of the compiler, meaning you can use the eslint plugin even if you don't use the compiler.
144144

145145
<TerminalBlock>
146-
npm install eslint-plugin-react-compiler
146+
npm install eslint-plugin-react-compiler@experimental
147147
</TerminalBlock>
148148

149149
Then, add it to your eslint config:
@@ -203,7 +203,7 @@ If you're starting a new project, you can enable the compiler on your entire cod
203203
### Babel {/*usage-with-babel*/}
204204

205205
<TerminalBlock>
206-
npm install babel-plugin-react-compiler
206+
npm install babel-plugin-react-compiler@experimental
207207
</TerminalBlock>
208208

209209
The compiler includes a Babel plugin which you can use in your build pipeline to run the compiler.
@@ -258,7 +258,7 @@ Next.js has an experimental configuration to enable the React Compiler. It autom
258258
- Install `babel-plugin-react-compiler`
259259

260260
<TerminalBlock>
261-
npm install next@canary babel-plugin-react-compiler
261+
npm install next@canary babel-plugin-react-compiler@experimental
262262
</TerminalBlock>
263263

264264
Then configure the experimental option in `next.config.js`:

src/content/reference/react/useLayoutEffect.md

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ function Tooltip() {
6767
6868
* The code inside `useLayoutEffect` and all state updates scheduled from it **block the browser from repainting the screen.** When used excessively, this makes your app slow. When possible, prefer [`useEffect`.](/reference/react/useEffect)
6969
70+
* If you trigger a state update inside `useLayoutEffect`, React will execute all remaining Effects immediately including `useEffect`.
71+
7072
---
7173
7274
## Usage {/*usage*/}

0 commit comments

Comments
 (0)