-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
feat<Compiler>: consider that the dispatch function from useReducer
is non-reactive
#29705
feat<Compiler>: consider that the dispatch function from useReducer
is non-reactive
#29705
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
useReducer
is non-reactiveuseReducer
is non-reactive
useReducer
is non-reactiveuseReducer
is non-reactive
Comparing: d77dd31...8353f1f Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
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.
Exciting, thanks for putting up a PR! Just some quick feedback, will do a full review next week
compiler/packages/babel-plugin-react-compiler/src/HIR/Globals.ts
Outdated
Show resolved
Hide resolved
compiler/packages/babel-plugin-react-compiler/src/Inference/InferReferenceEffects.ts
Outdated
Show resolved
Hide resolved
Thanks for your review! The required changes have been made. |
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.
awesome, thanks!
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.
Looks like you need to run prettier
9574ce4
to
086dafe
Compare
086dafe
to
610cde5
Compare
Oh, I forgot. Now it's fixed. |
610cde5
to
8353f1f
Compare
Awesome, thanks! |
… is non-reactive (#29705) Summary The dispatch function from useReducer is stable, so it is also non-reactive. the related PR: #29665 the related comment: #29674 (comment) I am not sure if the location of the new test file is appropriate😅. How did you test this change? Added the specific test compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/useReducer-returned-dispatcher-is-non-reactive.expect.md. DiffTrain build for commit 704aeed.
Summary
The dispatch function from
useReducer
is stable, so it is also non-reactive.the related PR: #29665
the related comment: #29674 (comment)
I am not sure if the location of the new test file is appropriate😅.
How did you test this change?
Added the specific test
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/useReducer-returned-dispatcher-is-non-reactive.expect.md
.