Hi! Thanks for trying out NativeBase!
Due to the overwhelming requests and issues/questions we ask you to add the following details with your issue.
Please check the existing open/closed issues for a possible duplicate before creating a new issue :)
Also DO fill out the below form to give us a better idea about your environment and help us debug it quicker. Issues without the required details will mostly be unattended to.
"native-base": "^2.3.1",
"react": "16.0.0-alpha.12",
"react-native": "https://github.com/expo/react-native/archive/sdk-20.0.0.tar.gz",
also using this on expo v20.0.0
Using DeckSwiper inside a Content component should render components returned by renderItem prop.
Using DeckSwiper inside of a Content component will cause items to not render.
The component rendered by renderEmpty prop is fine.
No component returned by renderItem prop is ever visible on screen
This is similar behavior to what is observed here:
https://github.com/GeekyAnts/NativeBase/issues/369
This does not work.
class DummyScreen extends React.Component{
constructor(props){
super(props);
this.blah = this.blah.bind(this)
}
blah(item){
return <TinderCard title='OMG IT RENDERED'></TinderCard>
}
render(){
let data = [];
data = [1,2,3,4,5];
return (
<Container>
<Header>
<Left>
<Button transparent onPress={this.showMenu}>
<Icon name="menu"></Icon>
</Button>
</Left>
<Body>
<Title>Tinder</Title>
</Body>
<Right></Right>
</Header>
<Content>
<View style={{ flex: 1 }}>
<DeckSwiper
dataSource={data}
renderItem={this.blah}
renderEmpty={ ()=><Text>GFY</Text> } />
</View>
</Content>
</Container>
);
}
}
but if we remove Content component it works
class DummyScreen extends React.Component{
constructor(props){
super(props);
this.blah = this.blah.bind(this)
}
blah(item){
return <TinderCard title='OMG IT RENDERED'></TinderCard>
}
render(){
let data = [];
data = [1,2,3,4,5];
return (
<Container>
<Header>
<Left>
<Button transparent onPress={this.showMenu}>
<Icon name="menu"></Icon>
</Button>
</Left>
<Body>
<Title>Tinder</Title>
</Body>
<Right></Right>
</Header>
<View style={{ flex: 1 }}>
<DeckSwiper
dataSource={data}
renderItem={this.blah}
renderEmpty={ ()=><Text>GFY</Text> } />
</View>
</Container>
);
}
}
for the record this does not work either:
<Content style={{ flex: 1 }}>
<DeckSwiper
dataSource={data}
renderItem={this.blah}
renderEmpty={ ()=><Text>GFY</Text> } />
</Content>

haven't been able to test ios

@w- Seems to be working fine with the content in the latest version 2.3.1
@shivrajkumar Thanks for confirming. I am on 2.3.1
It doesn't work for me in expo.
I'm not sure what else I can do on my end.
I guess you can close this as you are unable to repro, but it's strange that it works for you and not for me.
@w- Have you checked whether you are able to access items in blah function
Yes. I tried rendering blah independently without issue.
I am seeing this same issue in Android, but it works in iOS. No error or reason given
I'm also having this issue with Android.
To add to @dalefrancis88, it does render on an older iPad, but cards don't seem to want to fully "flip" and stop in the middle with two cards showing, one that is half-flipped and the one underneath that should have become the top card. It takes a few swipes to get it to flip.
adding flex:1 to prop contentContainerStyle solves the issue in android
```
Most helpful comment
adding
````
flex:1to propcontentContainerStylesolves the issue in android```