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
* [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
Copy file name to clipboardExpand all lines: src/content/learn/react-compiler.md
+6-22Lines changed: 6 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,10 @@ In order to optimize applications, React Compiler automatically memoizes your co
48
48
49
49
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.
50
50
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
+
51
55
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.
52
56
53
57
<DeepDive>
@@ -120,28 +124,6 @@ Please note that the compiler is still in Beta and has many rough edges. While i
120
124
121
125
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.
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 = {
165
147
166
148
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.
167
149
150
+
<Note>
168
151
**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>
169
153
170
154
### Rolling out the compiler to your codebase {/*using-the-compiler-effectively*/}
0 commit comments