Skip to content

Commit 8c20731

Browse files
committed
[crud] Rename Effect type
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 70d79ad commit 8c20731

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react-reconciler/src/ReactFiberHooks.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ type EffectInstance = {
218218
destroy: void | (() => void),
219219
};
220220

221-
export type Effect = {
221+
export type Effect = SimpleEffect;
222+
export type SimpleEffect = {
222223
tag: HookFlags,
223224
create: () => (() => void) | void,
224225
inst: EffectInstance,
@@ -2522,6 +2523,10 @@ function pushEffect(
25222523
// Circular
25232524
next: (null: any),
25242525
};
2526+
return pushEffectImpl(effect);
2527+
}
2528+
2529+
function pushEffectImpl(effect: Effect): Effect {
25252530
let componentUpdateQueue: null | FunctionComponentUpdateQueue =
25262531
(currentlyRenderingFiber.updateQueue: any);
25272532
if (componentUpdateQueue === null) {

0 commit comments

Comments
 (0)