leecade / leecade/react-native-swiper

First slide content not displaying until begin swipe

Open
#706 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

iOS using react-navigation

import React, { Component } from 'react';
import { View, Text, ScrollView } from 'react-native';
import Swiper from 'react-native-swiper';

class Activity extends Component {
	render() {
		return (
			<Swiper style={styles.wrapper} showsButtons={false}>
				<View style={styles.slide1}>
					<Text style={styles.text}>Hello Swiper</Text>
				</View>
				<View style={styles.slide2}>
					<Text style={styles.text}>Beautiful</Text>
				</View>
			</Swiper>
		);
	}
}

const styles = {
	wrapper: {
		backgroundColor: '#3D396D'
	},
	slide1: {
		flex: 1,
		justifyContent: 'center',
		alignItems: 'center'
	},
	slide2: {
		flex: 1,
		justifyContent: 'center',
		alignItems: 'center'
	},
	text: {
		color: '#fff',
		fontSize: 30
	}
};

export default Activity;

initial render before swipe gesture:

screenshot 2018-01-06 04 47 35

during/after swipe gesture begins:

screenshot 2018-01-06 04 47 48

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on iOS using the Activity example and the supplied Swiper configuration, first checking the initial render before any swipe. Inspect the Swiper rendering and layout entry points to determine why the first slide appears only when a gesture begins; done means the first slide is visible immediately on initial render.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.