Skip to content

Commit 908d030

Browse files
committed
chore: rename trigger to schedule effects
1 parent 55c1b93 commit 908d030

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/qwik/src/core/reactive-primitives/impl/wrapped-signal-impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
SignalFlags,
1313
WrappedSignalFlags,
1414
} from '../types';
15-
import { triggerEffects } from '../utils';
15+
import { scheduleEffects } from '../utils';
1616
import { SignalImpl } from './signal-impl';
1717

1818
export class WrappedSignalImpl<T> extends SignalImpl<T> implements BackRef {
@@ -57,7 +57,7 @@ export class WrappedSignalImpl<T> extends SignalImpl<T> implements BackRef {
5757
// if the computation not failed, we can run the effects directly
5858
if (this.$flags$ & SignalFlags.RUN_EFFECTS) {
5959
this.$flags$ &= ~SignalFlags.RUN_EFFECTS;
60-
triggerEffects(this.$container$, this, this.$effects$);
60+
scheduleEffects(this.$container$, this, this.$effects$);
6161
}
6262
}
6363

packages/qwik/src/core/reactive-primitives/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export const addQrlToSerializationCtx = (
8484
}
8585
};
8686

87-
export const triggerEffects = (
87+
export const scheduleEffects = (
8888
container: Container | null,
8989
signal: SignalImpl | StoreTarget,
9090
effects: Set<EffectSubscription> | null

packages/qwik/src/core/shared/scheduler.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ import {
9595
type EffectSubscription,
9696
type StoreTarget,
9797
} from '../reactive-primitives/types';
98-
import { triggerEffects } from '../reactive-primitives/utils';
98+
import { scheduleEffects } from '../reactive-primitives/utils';
9999
import { type ISsrNode, type SSRContainer } from '../ssr/ssr-types';
100100
import { runResource, type ResourceDescriptor } from '../use/use-resource';
101101
import {
@@ -738,13 +738,13 @@ This is often caused by modifying a signal in an already rendered component duri
738738
() => {
739739
if ((target as ComputedSignalImpl<unknown>).$flags$ & SignalFlags.RUN_EFFECTS) {
740740
(target as ComputedSignalImpl<unknown>).$flags$ &= ~SignalFlags.RUN_EFFECTS;
741-
return retryOnPromise(() => triggerEffects(container, target, effects));
741+
return retryOnPromise(() => scheduleEffects(container, target, effects));
742742
}
743743
}
744744
) as ValueOrPromise<ChoreReturnValue<ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS>>;
745745
} else {
746746
returnValue = retryOnPromise(() => {
747-
triggerEffects(container, target, effects);
747+
scheduleEffects(container, target, effects);
748748
}) as ValueOrPromise<ChoreReturnValue<ChoreType.RECOMPUTE_AND_SCHEDULE_EFFECTS>>;
749749
}
750750
}

0 commit comments

Comments
 (0)