pota/use/scrollpota/use/scroll exports
scrollIntoView as a ref factory plus a
handful of imperative scrolling helpers — element targeting,
hash-driven scroll, and scroll-to-top. Reach for the imperative
helpers when you don't have a ref-factory opportunity (handling a
click, responding to a route change, etc.).
scrollIntoView(opts?) — use:ref
factory: scroll the element into view on mountscrollToElement(node) — reset
scrollTop and scrollIntoView(true)scrollToSelector(selector) —
resolve a hash (id-first) or CSS selector; returns true on successscrollToSelectorWithFallback(selector)
— same, falls back to scrollToTop() on a missscrollToLocationHash() —
scroll to window.location.hash if a match existsscrollToTop() —
window.scrollTo({ top: 0 })