How do I know if the React Compiler is working? #63
Unanswered
salieflewis
asked this question in
General Questions
Replies: 2 comments 1 reply
-
I followed the exact instructions as you did, and I can't see this export default function Compiler() {
const [count, setCount] = useState(0);
return (
<>
<Button title={`Count: ${count}`} onPress={() => setCount(p => p + 1)} />
<Random />
</>
);
}
const Random = () => {
return (
<Text>{Math.random()}</Text>
);
}; |
Beta Was this translation helpful? Give feedback.
1 reply
-
I recommend using this extension: https://marketplace.visualstudio.com/items?itemName=blazejkustra.react-compiler-marker It shows if the component you are working is memoized by the compiler. The react extension for chrome doesn't work 100% |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I read in the React Native 0.78 Release Notes that "components that are memoized have the Memo ✨ tag attached to them in the Component Inspector."
I'm using Expo SDK 52 and followed the instructions here for enabling React Compiler, yet I don't see any of those Memo ✨ tags when viewing the React DevTools. Is it safe to assume that it should appear in the version of React Native that I am using (0.76.7) or is there something else I need to do to enable it?
Beta Was this translation helpful? Give feedback.
All reactions