-
Notifications
You must be signed in to change notification settings - Fork 309
Add the official React Compiler #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b3c6462
to
dcff467
Compare
dcff467
to
0b56eb0
Compare
Thanks for this PR! In testing I'm finding that the mobile hook is now firing quite a lot (the get snapshot function), is that expected? |
Hi @joetannenbaum, does it trigger renders or is the callback function being invoked many times? I implemented the hook based on https://react.dev/reference/react/useSyncExternalStore#subscribing-to-a-browser-api. I could try to extract the snapshot function from the component so it's using the same reference. Might be the issue. |
@joetannenbaum Unfortunately I can't test the fix because I added it on mobile. Would you be able to check if my recent commit fixes the issue? |
I can test the changes this friday. |
@joetannenbaum Tested it, it only triggers a rerender when the breakpoint is met. |
Thank you! |
This pull request adds the new, official, React Compiler to the starter kit.
I made sure all the React related dependencies are on a compatible version. The version of the React eslint plugin had some errors on a couple of hooks and components. I made changes accordingly. Happy to clarify any changes when needed.