Skip to content

Instantly share code, notes, and snippets.

@gordonbrander
Last active November 6, 2022 07:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gordonbrander/f73c8592f1a214068263c8561a28fdf2 to your computer and use it in GitHub Desktop.
Save gordonbrander/f73c8592f1a214068263c8561a28fdf2 to your computer and use it in GitHub Desktop.
frame.js
// Promise for an animation frame.
// Tip: use with `await`.
export const frame = () => new Promise(requestAnimationFrame)
@charlesodili
Copy link

Very interesting. Please, how would you use this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment