好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

react-native-sideswipe

react-native-sideswipe 介绍

一个 简单的,跨平台的react Native可滑动组件,具有合理的 默 认值 ,非常灵活的API。

安装

yarn add react-native-sideswipe

使用

import { Dimensions } from 'react-native';

import SideSwipe from 'react-native-sideswipe';

import CustomComponent from '...'

import data from '...'

export default class SweetCarousel extends Component {

state = {

currentIndex: 0,

};

render = () => {

// center items on screen

const { width } = Dimensions.get('window');

const contentOffset = (width - CustomComponent.WIDTH) / 2;

return (

<SideSwipe

index={this.state.currentIndex}

itemWidth={CustomComponent.WIDTH}

{{ width }}

data={data}

contentOffset={contentOffset}

onIndexChange={index =>

this.setState(() => ({ currentIndex: index }))

}

renderItem={({ itemIndex,currentIndex,item,animatedValue }) => (

<CustomComponent

{...item}

index={itemIndex}

currentIndex={currentIndex}

animatedValue={animatedValue}

/>

)}

/>

);

};

}

GitHub: https://github.com/kkemple/react-native-sideswipe

网站描述: 简单跨平台的React Native可滑动的组件

react-native-sideswipe官方网站

官方网站:

如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。

查看更多关于react-native-sideswipe的详细内容...

  阅读:25次

上一篇

下一篇

第1节:PhoneGap    第2节:WXPage    第3节:Remax    第4节:Mobiscroll    第5节:mobilebone.js    第6节:WeZRender    第7节:weex    第8节:image-cropper    第9节:mobile-calendar    第10节:amazeui    第11节:weui    第12节:wxapp-market    第13节:material-kit    第14节:AUI Mobile    第15节:touchui    第16节:alita    第17节:vum    第18节:FrozenUI    第19节:Touch WX    第20节:Flutter    第21节:nutui    第22节:Onsen UI    第23节:Tina.js    第24节:fastclick    第25节:golden-layout    第26节:Weex Ui    第27节:cordova    第28节:wxParse    第29节:antmove    第30节:GMU    第31节:react-use-gesture    第32节:labrador    第33节:wux-weapp    第34节:vux    第35节:noUiSlider    第36节:wechat-im    第37节:jquery-weui    第38节:vant    第39节:pulltorefresh.js    第40节:slip.js    第41节:react-native-sideswipe    第42节:BeautyWe.js    第43节:lottie-web    第44节:react-native-elements    第45节:cube-ui    第46节:lin-ui    第47节:wxSearch    第48节:DHTMLX    第49节:bttn.css    第50节:微信小程序    第51节:westore    第52节:framework7    第53节:uni-app    第54节:vue2-elm    第55节:vue-ydui    第56节:bindingx    第57节:Jingle UI    第58节:weui-wxss    第59节:WeexBox 2.0    第60节:vant-weapp    第61节:NativeScript    第62节:快应用    第63节:weui+    第64节:Taro    第65节:NativeBase    第66节:graceUI    第67节:mavonEditor    第68节:Ratchet    第69节:AKjs.Mobile    第70节:mobile-angular-ui    第71节:React Belle    第72节:Hermes    第73节:ColorUI    第74节:Atom-Design    第75节:ionic    第76节:wxapp-img-loader    第77节:React Native    第78节:jquery Mobile    第79节:vueg    第80节:mand-mobile    第81节:wemark    第82节:vasern    第83节:mint-ui    第84节:uni-simple-router    第85节:switchery    第86节:mobi.css    第87节:Mand Mobile    第88节:react-virtualized    第89节:iview-weapp    第90节:eros    第91节:minui    第92节:react-native-ui-lib