Last active
November 6, 2022 07:36
-
-
Save gordonbrander/f73c8592f1a214068263c8561a28fdf2 to your computer and use it in GitHub Desktop.
frame.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Promise for an animation frame. | |
// Tip: use with `await`. | |
export const frame = () => new Promise(requestAnimationFrame) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very interesting. Please, how would you use this?