Skip to content

Commit

Permalink
✏️ add afterFrame() inspiration source
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed Aug 23, 2023
1 parent 9c4d543 commit b32fe51
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/afterFrame.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import queueTask from './queueTask'

// inspired by: https://github.com/andrewiggins/afterframe
export default function afterFrame(callback: () => void): void {
requestAnimationFrame(() => {
queueTask(callback)
Expand Down

0 comments on commit b32fe51

Please sign in to comment.