Skip to content

Commit

Permalink
leverage flush
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jan 5, 2023
1 parent 3a04a3e commit 62fd280
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/preact/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ export function useSignalEffect(cb: () => void | (() => void), options?: EffectO
const execute = () => callback.current();
const notify = () => {
if (mode === 'afterPaint') {
afterNextFrame(execute)
afterNextFrame(eff.flush)
} else {
callback.current();
eff.flush();
}
}
const eff = createFlusher(execute, notify);
Expand Down

0 comments on commit 62fd280

Please sign in to comment.