How to implement a scrollview like an appstore? I'm going to scroll to the next content, when the scroll is done halfway
相关问题
- How to toggle on Order in ReactJS
- Refreshing page gives Cannot GET /page_url in reac
- Adding a timeout to a render function in ReactJS
- React Native Inline style for multiple Text in sin
- Issue with React.PropTypes.func.isRequired
相关文章
- Why would we use useEffect without a dependency ar
- Is it possible to get ref of props.children?
- Why do we have to call `.done()` at the end of a p
- Stateless function components cannot be given refs
- React testing library: Test attribute / prop
- React/JestJS/Enzyme: How to test for ref function?
- Material-UI [v0.x] RaisedButton on hover styles
- Remove expo from react native
I recommend using Flatlist which is React-Native's own component.
If you want to swipe the data Horizontally the use the prop
horizontal={true}
in the Flatlist.The feature or functionality you are looking for is a simple horizontal slider. Use could use this npm library to get what you are looking for: https://www.npmjs.com/package/react-native-snap-carousel
Something like this is what you want?
Source code: https://snack.expo.io/@gusgard/react-native-swiper-flatlist-2
Library: https://www.npmjs.com/package/react-native-swiper-flatlist
You can implement it simple with
FlatList
, usinghorizontal
andpagingEnabled
boolean props anddeviceWidth
;