
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-stuff-swiper
Advanced tools
[](https://www.npmjs.com/package/react-native-stuff-swiper)
A lightweight React Native component for swipe stuff out!
Besides horizontal swipe motion, it has support for side buttons, static header and footer.

import React, { useRef, useState } from 'react';
import StuffSwiper from 'react-native-stuff-swiper';
...
const YourAwesomeComponent = () => {
const [screensData, setScreensData] = useState(null);
const swiperRef = useRef(null);
const onPaginationChange = ({ pagination, total, currentIndex}) => {
// Do your stuff here ...
}
return (
<StuffSwiper
ref={swiperRef}
HeaderComponent={<YourHeaderComponent />}
screensData={screensData}
enableSideButtons
loop
onPaginationChange={onPaginationChange}
DefaultScreenComponent={MyScreenComponent}
/>
);
};
NOTE: ref it's required in order to use public methods (e.g. swiperRef.current.goToIndex(0) in the above example)
screenData prop must be an array of objects with the following format:
{
id: 2,
screen: <ReactComponent />,
// OR
props: {
//your props
}
}
[
{
id: '1',
screen:
<View>
<Text>My first screen </Text>
</View>,
},
{
id: '2',
screen:
<View>
<FlatList
data={myListInfos}
keyExtractor={(item, index) => item + index}
renderItem={({ item }) => <Text style={{ fontSize: 16 }}>{item}</Text>}
/>
</View>,
},
{
id: '3',
screen:
<Image
style={{width: 100, height: 100}}
source={{uri: 'https://facebook.github.io/react-native/img/tiny_logo.png'}}
/>
},
]
[
{
id: '1',
props: {
title: 'first screen',
},
{
id: '2',
props: {
title: 'second screen',
},
},
{
id: '3',
props: {
title: 'third screen',
// any other props that you want to be injected into our DefaultScreenComponent
},
},
]
| Prop name | Info | Type |
|---|---|---|
| onPaginationChange | Callback that returns pagination (aka formatted current/total), currentIndex and total | Function |
| loop | Specify if the loop behaviour it's enabled (default: false) | Bool |
| animated | Specify if the animations are enabled (default: true) | Bool |
| screensData | Data that will be rendered on screens | Array of Objects |
| HeaderComponent | Component that will be rendered as header | React Component |
| FooterComponent | Component that will be rendered as footer | React Component |
| DefaultScreenComponent | Component that will be rendered as screen | React Component |
| DefaultScreenProps | Global Props that will be injected in DefaultScreenComponent | Object |
| enableSideButtons | Specify if side buttons are enabled (default: false) | Bool |
| nextButtonComponent | Component that will be rendered as next side button | React Component |
| previousButtonComponent | Component that will be rendered as previous side button | React Component |
| styleHeaderContainer | Specify the header container styles | Style Object |
| styleFooterContainer | Specify the footer container styles | Style Object |
| styleContentContainer | Specify the content container styles | Style Object |
| styleSideButtonsContainer | Specify the side buttons container styles | Style Object |
| styleButton | Specify the default side button container styles | Style Object |
| buttonSize | Specify the side buttons size (default: 30) | Number |
| Method name | Info | Parameters | Return |
|---|---|---|---|
| getPagination | Get current pagination status | - | { currentIndex, pagination, total } |
| next | Go to the next screen | - | - |
| prev | Go to the previous screen | - | - |
| goToIndex | Go to the specified index | index | - |
FAQs
[](https://www.npmjs.com/package/react-native-stuff-swiper)
We found that react-native-stuff-swiper 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
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.