callstack / callstack/react-native-pager-view

could it possible that ViewPager do not need to set a style with a specific height?

Open
#154 4 comments 6 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
3.4k
Forks
476
Avg merge
10d 21h
Merged PRs (30d)
2

Description

# Question
the example in `readme` provide a `style={{ flex: 1 }}` to `ViewPager`(like bellow),and it occupy all screen height; but in my case, the pager's height is not specific,it depends; but without a specific height, `ViewPager` show nothing

so, could the height of `ViewPager` be flexible ?
```
import React from 'react';
import {StyleSheet, View, Text} from 'react-native';
import ViewPager from '@react-native-community/viewpager';

const MyPager = () => {
return (


First page


Second page


);
};

const styles = StyleSheet.create({
viewPager: {
flex: 1,
},
});
```

Contributor guide

Open the contributing guide

Research direction

The issue points to the README ViewPager example but names no implementation file or test. Start by reproducing the example with a content-dependent parent height and inspect the ViewPager layout behavior. Done means establishing whether flexible height is supported and documenting or verifying the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.