Skip to content

Commit 62fd280

Browse files
committed
leverage flush
1 parent 3a04a3e commit 62fd280

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/preact/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ export function useSignalEffect(cb: () => void | (() => void), options?: EffectO
390390
const execute = () => callback.current();
391391
const notify = () => {
392392
if (mode === 'afterPaint') {
393-
afterNextFrame(execute)
393+
afterNextFrame(eff.flush)
394394
} else {
395-
callback.current();
395+
eff.flush();
396396
}
397397
}
398398
const eff = createFlusher(execute, notify);

0 commit comments

Comments
 (0)