I am currently working on a project that involves using TabbedHeaderPager, and I need to change tabs programmatically. I have been attempting to use the function goToPage() but have run into difficulties accessing it. I have tried passing it as a prop and through pagerProps.
<TabbedHeaderPager
goToPage={goToPage} // unable to access function here
pagerProps={{
onScroll, //this function works
goToPage // unable to access function here
}}
rememberTabScrollPosition
onTopReached={() => console.log('onTopReached')}
snapToEdge={false}
parallaxHeight={400}
backgroundColor={t.background.val}
title={club.name ? club.name : 'My Golf Club'}
foregroundImage={getClubLogoImage(club)}
containerStyle={{
minHeight: 800,
}}
backgroundImage={getClubBackgroundImage(club)}
tabs={tabs}
>
{tabs.map((tab, index) => tab.content)}
</TabbedHeaderPager>