Releases: GeorgeHop/react-native-screens-swiper
Releases · GeorgeHop/react-native-screens-swiper
v1.1.11
v1.1.10
v1.1.9
v1.1.8
v1.1.5
v1.1.3
v1.1.0
Added support of rendering React components, render functions and JSX elements.
Components and functions recieve props specified in data
and additional index
props.
import FirstScreen from "./FirstScreen";
import SecondScreen from "./SecondScreen";
...
const data = [
{
tabLabel: 'Valid component in form of JSX element',
component: <FirstScreen/>,
},
{
tabLabel: 'Valid component in form of React component',
component: SecondScreen,
props: {}, // additional props
},
{
tabLabel: 'Valid component in form of render function',
component: ({index, ...props}) => {},
props: {}, // additional props
},
];
return <Swiper data={data}/>;