Skip to content

Commit 176537a

Browse files
committed
clarify brain emoji
1 parent 4846020 commit 176537a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/content/learn/react-compiler.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
---
24
title: React Compiler
35
---
@@ -317,6 +319,13 @@ React Compiler can verify many of the Rules of React statically, and will safely
317319

318320
[React DevTools](/learn/react-developer-tools) (v5.0+) and [React Native DevTools](https://reactnative.dev/docs/react-native-devtools) have built-in support for React Compiler and will display a "Memo ✨" badge next to components that have been optimized by the compiler.
319321

322+
Additionally, React DevTools shows different indicators for memoized components:
323+
324+
* **🧠 Brain emoji** - appears next to components that have been manually wrapped with [`memo()`](/reference/react/memo)
325+
* **"Memo ✨" badge** - appears next to components that have been automatically optimized by React Compiler
326+
327+
This helps you distinguish between manual optimizations you've added and automatic optimizations applied by the compiler.
328+
320329
### Something is not working after compilation {/*something-is-not-working-after-compilation*/}
321330
If you have eslint-plugin-react-compiler installed, the compiler 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. **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.
322331

@@ -344,3 +353,5 @@ When you make the error go away, confirm that removing the opt out directive mak
344353
### Other issues {/*other-issues*/}
345354

346355
Please see https://github.com/reactwg/react-compiler/discussions/7.
356+
357+

0 commit comments

Comments
 (0)