-
-
Notifications
You must be signed in to change notification settings - Fork 13
perf: add React Compiler #109
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
✅ Deploy Preview for eslint-code-explorer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request aims to optimize our React application by integrating the React Compiler, which automates memoization of components and hooks to reduce unnecessary re-renders.
- Added configuration in vite.config.ts to enable the React Compiler via the Babel plugin.
- Upgraded dependencies in package.json including React, babel-plugin-react-compiler, and eslint-plugin-react-hooks.
- Updated eslint.config.mjs to enforce the new react-hooks/react-compiler rule and temporarily disabled this rule in one component file.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
vite.config.ts | Integrated babel-plugin-react-compiler in the React plugin config |
src/components/path/index.tsx | Temporarily disabled react-hooks/react-compiler for specific use |
package.json | Upgraded dependencies to support the React Compiler integration |
eslint.config.mjs | Added new ESLint rule for react-hooks/react-compiler |
Could you take a look at the merge conflicts? |
Could you provide the before/after changes, including bug fixes? Including a benchmark would be nice if possible. |
@lumirlumir can you better describe what you mean by "before/after changes"? It's not clear to me what it is you're requesting. |
I think he wants a before/after video of the bug fix Before:before.mp4After:after.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks all for clarifying my words. Since the bug behavior was not reproducible on my end, I needed an alternative way to check it.
LGTM. Would like @amareshsm to verify the bug fix on his end before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thanks.
Prerequisites checklist
What is the purpose of this pull request?
This PR installs the React Compiler to optimize our React application by automatically memoizing components and hooks. The compiler helps improve performance by reducing unnecessary re-renders and computations.
What changes did you make? (Give an overview)
1- Installed the following dependencies:
2- Modified vite.config.ts to include the compiler plugin
3- Added "react-hooks/react-compiler": "error" to enable the React Compiler ESLint rule
Related Issues
This fixes #67 for me
Is there anything you'd like reviewers to focus on?