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

Simply
import { RootScrollerContext } from 'full-view-snap-react'

And obtain the function
const { 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

← Examples