Skip to content

Commit

Permalink
[crud] Rename Effect type
Browse files Browse the repository at this point in the history
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
poteto committed Nov 15, 2024
1 parent 0a8e58e commit 7aa0223
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react-reconciler/src/ReactFiberHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ type EffectInstance = {
destroy: void | (() => void),
};

export type Effect = {
export type Effect = SimpleEffect;
export type SimpleEffect = {
tag: HookFlags,
create: () => (() => void) | void,
inst: EffectInstance,
Expand Down Expand Up @@ -2522,6 +2523,10 @@ function pushEffect(
// Circular
next: (null: any),
};
return pushEffectImpl(effect);
}

function pushEffectImpl(effect: Effect): Effect {
let componentUpdateQueue: null | FunctionComponentUpdateQueue =
(currentlyRenderingFiber.updateQueue: any);
if (componentUpdateQueue === null) {
Expand Down

0 comments on commit 7aa0223

Please sign in to comment.