Just call the scrollToView function within the rootScrollerContext render prop with the index of the view you want to scroll to.
rootScrollerContext.scrollToView(1)
Have a deep nested structure?
A context is wrapped around everything beneath the FullViewSnap component
Simplyimport { RootScrollerContext } from 'full-view-snap-react'
And obtain the functionconst { scrollToView } = useContext(RootScrollerContext);
Then scroll to the desired view by passing the index:scrollToView(index)
See PaginationButton.tsx in this project for an example implementation