
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-native-pager-view-x
Advanced tools
npm install react-native-pager-view-x
# or
yarn add react-native-pager-view-x
If you encounter a bug due to react-native-pager-view, you can also use the FlatList provided by default in RN.
const pagerViewXRef = useRef<PagerViewXRef>(null);
const scrollEnabledRef = useRef(true);
return (
<PagerViewX ref={pagerViewXRef} initialPage={1}>
<View
style={{
flex: 1,
width: Dimensions.get('window').width,
backgroundColor: 'red',
}}
>
<Button
title={'toggle setScrollEnabled'}
onPress={() => {
pagerViewXRef.current?.setScrollEnabled(
!scrollEnabledRef.current
);
scrollEnabledRef.current = !scrollEnabledRef.current;
}}
/>
<ExButton
text={'Go to 3 Page'}
onPress={() => {
pagerViewXRef.current?.setPage(2);
}}
/>
</View>
<View style={{ flex: 1, backgroundColor: 'blue' }} />
<View style={{ flex: 1, backgroundColor: 'green' }}>
<ExButton
text={'go to 1page without animation'}
onPress={() => {
pagerViewXRef.current?.setPageWithoutAnimation(0);
}}
/>
</View>
</PagerViewX>
Props| Prop | Type | Description |
|---|---|---|
initialPage | number (optional) | The initial page index. |
scrollEnabled | boolean (optional) | Sets whether scrolling is enabled. |
onPageScroll | function (optional) | Event handler for page scroll events. |
children | ReactElement or ReactElement[] (optional) | Child elements to be displayed as pages. |
activityIndicator | ReactNode (optional) | Component to display while a page is loading. |
[key: string] | any | Any prop that can be used in FlatList can be added |
Methods from ref| Method | Description |
|---|---|
setPage | Sets the current page. |
setPageWithoutAnimation | Sets the current page without animation. |
setScrollEnabled | Sets whether scrolling is enabled. |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
Are you debugging due to react-native-pager-view?
The npm package react-native-pager-view-x receives a total of 2 weekly downloads. As such, react-native-pager-view-x popularity was classified as not popular.
We found that react-native-pager-view-x demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.