Open infaz opened 5 years ago
Hi @infaz have you find any the solution for this. I am also going through the same problem.
You can create a placeholder view first. Then observe for current page changed then init the component yourself.
<IndicatorViewPager
onPageSelected={params => {
setCurrentPage(params.position);
}}
>
<View style={{ width }}>
<YourFirstPage />
</View>
<View style={{ width }}>
{isSecondPageInitialized && <YourSecondPage />}
</View>
</IndicatorViewPager>
Ok thanks. I will try this.
How to load the page only when user selects the tab. Currently, It loads all the views initially. I want to load each view when user select each tab.