Closed SamindaVidanaPathirana closed 8 years ago
hi @SamindaPathiranaJadoPado, just tested this in ios and android, and seems to be working. Here's my code:
state = {
words: [
'foo',
'bar'
]
};
componentDidMount() {
setTimeout(()=>{
this.setState({
words: [ 'foo', 'wiz' ]
});
setTimeout(()=>{
this.setState({
words: [ 'foo' ]
});
}, 3000);
}, 3000);
}
//...
render() {
const pages = this.state.words.map(w => <Text key={w}>{w}</Text>);
return (
<View style={styles.container}>
<Carousel pageStyle={ {backgroundColor: "white", borderRadius: 5} } initialPage={ 1 }>
{ pages }
</Carousel>
</View>
);
}
If you still have this problem, let me know if you can share a bit more code.
Thanks @machadogj managed to figure it out.
This is how i'm including the Carousel to my screen, and upon a certain action i'm deleting an object and updating the "state.sliderValueList" value. But that doesn't seem to update the Carousel, the item is visible till i close the screen and load it back. Requires an urgent feedback.
Thanks