Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
🔬 feat: exp with react-compiler (#12309)#12333
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
* test: Add task running unit tests with react-compiler* Use official compiler runtime* 📖 fix: code example input field placeholder name (#12296)* 🐞fix:#12294 ensure Invalid Date is evaluated correctly (#12295)* fix: ensure Invalid Date is evaluated correctly*fix:#12294 ensure Invalid Date is evaluated correctly*fix:#12294 ensure Invalid Date is evaluated correctly* Update createFormControl.ts* Update createFormControl.ts* Update createFormControl.ts---------Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>---------Co-authored-by: Kim Sang Du <puki4416@gmail.com>Co-authored-by: Toshiki Saito <50011163+crypt0box@users.noreply.github.com>Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>
github-actionsbot commentedOct 13, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Size Change: +279 B (+0.51%) Total Size: 55.2 kB
ℹ️View Unchanged
|
ellemedit commentedJan 21, 2025
could I know what's blocking this? |
I will need more time to get to it and then release an RC version of it later. |
Thank you for your contributions! This Pull Request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Best, RHF Team ❤️ |
This comment was marked as spam.
This comment was marked as spam.
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 PR introduces experimental support for the react-compiler along with several improvements to form-related tests and component definitions. The main changes include:
- Updates to test components with explicit prop type definitions.
- Replacing JSON-stringified output assertions with direct text checks.
- Renaming of temporary ID variables from "i" to "mockId" throughout field array tests.
- New Babel and Jest configuration to support the react-compiler.
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/tests/useForm/reset.test.tsx | Changed assertions from JSON-stringified outputs to conditional text rendering. |
src/tests/useForm/handleSubmit.test.tsx | Added explicit prop types for test component and updated render calls. |
src/tests/useForm/getFieldState.test.tsx | Removed unused destructured properties in tests. |
src/tests/useForm/formState.test.tsx | Modified waitFor usage and added explicit text rendering. |
src/tests/useFieldArray/* | Renamed temporary ID variable from "i" to "mockId" in multiple tests. |
src/tests/useController.test.tsx | Updated component definitions with explicit prop types. |
src/tests/form.test.tsx | Refactored test components to pass explicit props. |
src/tests/controller.test.tsx | Updated tests to use explicit prop types and adjusted assertions. |
scripts/jest/jest-react-compiler.config.js | Introduced a new Jest config for react-compiler. |
package.json | Added a new test command and Babel dependencies for react-compiler support. |
babel.config.js | Configured Babel to enable react-compiler plugin for test files. |
app/src/setValue.tsx | Adjusted useEffect dependencies for setting form values. |
Comments suppressed due to low confidence (1)
app/src/setValue.tsx:63
- [nitpick] Removing 'register' from the dependency array may be acceptable if it is stable. Please verify that its exclusion does not affect the intended registration behavior.
}, [setValue]);
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
related#12298
API
getFieldState
reset
register
getValues
watch