Repository navigation
How do I know if the React Compiler is working? #63
Replies: 3 comments 2 replies
|
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>
);
}; |
|
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% |
|
The missing The important detail is that the Expo SDK 52 can still enable the React Compiler through its Babel integration. To verify the setup, check these things:
You can also run My recommendation: Don't upgrade React Native solely to get the References: |
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?
All reactions