-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
fix(act): Don't warn if an effect was not queued #19319
Conversation
@@ -1275,12 +1282,6 @@ function updateEffect( | |||
create: () => (() => void) | void, | |||
deps: Array<mixed> | void | null, | |||
): void { | |||
if (__DEV__) { |
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.
Should we move this in mountEffect
as well for symmetry?
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 49a479b:
|
Comparing: 2442d98...9a0e80e Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
a03f286
to
72617dd
Compare
This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated. |
Bump |
49a479b
to
dac5708
Compare
Rebased and fixed some misconceptions about tags vs flags. I treated the hook flags as a single number when they're actually a bitset. |
6d1d5ca
to
98ced8d
Compare
Can't move FlowExpectError closer to the actual condition (like ts-expect-error). In order to still get type-checking for the flag comparison we just wrap it in another if. Since this is dev-only the additional bytes should be fine. In the end a compiler could always squash nested ifs.
98ced8d
to
f4d0267
Compare
f4d0267
to
9a0e80e
Compare
Will no longer be relevant for React 18 where even a render needs to be wrapped in |
Summary
Closes #19318
Test Plan
globalThis.jest = null