Skip to content

Commit 8f6d6a9

Browse files
authored
[compiler] Remove section on healthcheck (#7239)
* [compiler] Remove section on healthcheck This package will be deprecated soon. It makes adopting the compiler confusing since it can spread the misconception that you need to have all your components successfully compiled before you can use the compiler. For now let's remove this from our docs and deprecate the package on npm. We can always choose to repurpose this in the future. * Clarify that 100% compilation is not necessary
1 parent 9467bc5 commit 8f6d6a9

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

src/content/learn/react-compiler.md

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ In order to optimize applications, React Compiler automatically memoizes your co
4848

4949
The compiler uses its knowledge of JavaScript and React's rules to automatically memoize values or groups of values within your components and hooks. If it detects breakages of the rules, it will automatically skip over just those components or hooks, and continue safely compiling other code.
5050

51+
<Note>
52+
React Compiler can statically detect when Rules of React are broken, and safely opt-out of optimizing just the affected components or hooks. It is not necessary for the compiler to optimize 100% of your codebase.
53+
</Note>
54+
5155
If your codebase is already very well-memoized, you might not expect to see major performance improvements with the compiler. However, in practice memoizing the correct dependencies that cause performance issues is tricky to get right by hand.
5256

5357
<DeepDive>
@@ -120,28 +124,6 @@ Please note that the compiler is still in Beta and has many rough edges. While i
120124

121125
In addition to these docs, we recommend checking the [React Compiler Working Group](https://github.com/reactwg/react-compiler) for additional information and discussion about the compiler.
122126

123-
### Checking compatibility {/*checking-compatibility*/}
124-
125-
Prior to installing the compiler, you can first check to see if your codebase is compatible:
126-
127-
<TerminalBlock>
128-
npx react-compiler-healthcheck@beta
129-
</TerminalBlock>
130-
131-
This script will:
132-
133-
- Check how many components can be successfully optimized: higher is better
134-
- Check for `<StrictMode>` usage: having this enabled and followed means a higher chance that the [Rules of React](/reference/rules) are followed
135-
- Check for incompatible library usage: known libraries that are incompatible with the compiler
136-
137-
As an example:
138-
139-
<TerminalBlock>
140-
Successfully compiled 8 out of 9 components.
141-
StrictMode usage not found.
142-
Found no usage of incompatible libraries.
143-
</TerminalBlock>
144-
145127
### Installing eslint-plugin-react-compiler {/*installing-eslint-plugin-react-compiler*/}
146128

147129
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.
@@ -165,7 +147,9 @@ module.exports = {
165147

166148
The eslint plugin will display any violations of the rules of React in your editor. When it does this, it means that the compiler has skipped over optimizing that component or hook. This is perfectly okay, and the compiler can recover and continue optimizing other components in your codebase.
167149

150+
<Note>
168151
**You don't have to fix all eslint violations straight away.** You can address them at your own pace to increase the amount of components and hooks being optimized, but it is not required to fix everything before you can use the compiler.
152+
</Note>
169153

170154
### Rolling out the compiler to your codebase {/*using-the-compiler-effectively*/}
171155

0 commit comments

Comments
 (0)