Skip to content

Instantly share code, notes, and snippets.

@ImKubass
Created January 12, 2023 08:47
Show Gist options
  • Save ImKubass/309077d30cb8eb674519124543d0067e to your computer and use it in GitHub Desktop.
Save ImKubass/309077d30cb8eb674519124543d0067e to your computer and use it in GitHub Desktop.
const handle = () => {
console.log("Yo my size changed, do something with me")
}
const resizeObserver = new ResizeObserver(handle)
resizeObserver.observe(myElement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment