react-native-swiper

React Native Deck Swiper

对着背影说爱祢 提交于 2021-01-29 09:17:23
问题 I am trying to make a GET request to an enpoint using the two functional components below to display in my react native deck swipper //using fetch const getDataUsingFetch = () => { fetch(latestNews+ApiKey) .then((response) => response.json()) .then((responseJson) => { // set the state of the output here console.log(responseJson); setLatestNews(responseJson); }) .catch((error) => { console.error(error); }); } //using anxios //asynchronous get request call to fetech latest news const

RN swiper 与tabbar 冲突解决方案

匿名 (未验证) 提交于 2019-12-03 00:22:01
React Native第三方react-native-swiper组件可以实现轮播功能,但是在开发安卓应用的时候,如果同时使用了react-navigation的TabNavigator导航,会出现swiper内容不显示的问题 查看了react-native-swiper的github,发现issue中不少人都遇到了这样的问题 issue: https://github.com/leecade/react-native-swiper/issues/389 最后查找资料发现,在安卓机下,如果用到了可滚动组件例如SectionList,ScrollView或者TabNavigator这种可滑动的组建,swiper都无法正确显示, import React, { Component } from 'react' ; import { StyleSheet, Text, View, Image, } from 'react-native' ; import Swiper from 'react-native-swiper' ; export class ImgSwiper extends Component { constructor(props) { super (props); this .state = { swiperShow : false , }; }