![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
@ldn0x7dc/react-native-view-pager
Advanced tools
A ListView backed ViewPager component for react-native apps. More flexible than ViewPagerAndroid.
Readme
A ListView backed ViewPager component for react-native apps. More flexible than ViewPagerAndroid.
npm install --save @ldn0x7dc/react-native-view-pager
The private scope @ldn0x7dc
exists because this name has already been taken.
Have a glance at first.
import ViewPager from '@ldn0x7dc/react-native-view-pager';
...
render() {
return (
<ViewPager
style={{flex: 1}}
renderPage={(pageData, pageId, layout) => {}}
pageDataArray={['your', 'data', 'array']}
/>
);
}
Most of the props mimics those of ViewPagerAndroid. But differences exist.
renderPage
: function
(pageData, pageId, layout) => renderable
For your convenience, The layout object ({width, height}) contains the width and height of this ViewPager. The renderable returned here will be overridden with ViewPager's width and height.
pageDataArray
: array
Custom data array of your pages. Each array item will be passed to renderPage(pageData, pageId, layout)
as the first argument.
initialPage
: number
Index of initial page that should be selected. Use setPage
method to update the page, and onPageSelected
to monitor page changes
onPageScroll
: function
(event) => {}.
The event object will carry following data:
onPageScrollStateChanged
: function
(state) => {}.
Called when the page scrolling state has changed. The page scrolling state can be in 3 states: -
onPageSelected
: function
(page) => {}.
Called with the index of page that has been selected.
pageMargin
: number
Blank space to show between pages.
scrollEnabled
: bool
When false, the content does not scroll. The default value is true.
setPage(page, immediate)
A helper function to scroll to a specific page in the ViewPager. The transition between pages will be animated if immediate
is not provided or false.
FAQs
A ListView backed ViewPager component for react-native apps. More flexible than ViewPagerAndroid.
We found that @ldn0x7dc/react-native-view-pager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.