Hey both @OSUblake @JoeH, I really love the hook approach and am trying to run it in a project of my own (also coming from locomotive!), it's all working fine I'm just looking for a method to "refresh" the smoothscroll instance, for example, when I filter some projects, the page height might change, is there a function I can use to do this? I've tried the following with no luck:
import useScrollSmoother from '@/components/smooth-scroller'
export default function Example() {
const { smoother } = useScrollSmoother();
function scrollUpdate() {
smoother.refresh();
}
return (
<button onClick={scrollUpdate}>Update Height!</button>
)
}
Any help appreciated, cheers!