Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dry-lemons-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@preact/signals": patch
---

We reduce the raf timeout to be just above a timeout that is associated with a 30hz refresh rate. This ensures that for hidden frames the timeout drift can't be too large, the drift being too high could lead to unexpected situations.
2 changes: 1 addition & 1 deletion packages/preact/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ function safeRaf(callback: () => void) {
callback();
};

const timeout = setTimeout(done, 100);
const timeout = setTimeout(done, 35);
const raf = requestAnimationFrame(done);
}

Expand Down