Can't get anything to render with 3.1.0
See original GitHub issueHi there,
First off, thank you for building this component, it’s been very useful thus far!
I upgraded to the flat-list
branch before you released 3.0.0 and it was working fine, but now that I’m using 3.1.0 I can’t get anything to render. I had it working just fine with the prerelease branch, so I’m not sure what changed.
Here’s an example that just shows a white screen on both iOS and Android:
import React, { PureComponent } from 'react';
import {
Dimensions,
StyleSheet,
View,
} from 'react-native';
import Carousel from 'react-native-snap-carousel';
export default class ExampleCarousel extends PureComponent {
state = {
data: [{}, {}, {}, {}, {}, {}],
}
renderItem = () => (
<View style={styles.tile} />
);
render() {
return (
<View style={styles.container}>
<Carousel
data={this.state.data}
renderItem={this.renderItem}
itemWidth={Dimensions.get('window').width * 0.85}
sliderWidth={Dimensions.get('window').width}
style={styles.carousel}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
carousel: {
flex: 1,
backgroundColor: 'red',
},
tile: {
flexGrow: 1,
backgroundColor: 'red',
},
});
Can you let me know how to debug this further? I think I’m following the readme, and I did verify that the Container view is filling the entire screen by changing its background color to green, which made the screen green. So I know the carousel has enough space, it just doesn’t seem to render anything.
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Can't get anything to render with 3.1.0 · Issue #134 - GitHub
I upgraded to the flat-list branch before you released 3.0.0 and it was working fine, but now that I'm using 3.1.0 I can't...
Read more >T96485 Issue with rendering Blender 3.1.0
Main Issue: My animation is 1-120 frames. The issue is that past 115~117 frames I get black/weird textures showing up in the Render...
Read more >FAQ | Unity Render Streaming | 3.1.0-exp.4
FAQ. Errors. Video stream not showing in browser. The browser version might be too old. Make sure that the latest version is installed....
Read more >Tutorial | Unity Render Streaming | 3.1.0-exp.3
Check Package Manager window, Click Advanced button and enable Show preview packages . Select show preview packages on advanced options. Input ...
Read more >Blender: A Cycles render settings guide - Artisticrender.com
Let's get back to the culling section. It doesn't have anything to do with animals. Instead these settings will help us automatically remove...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @blargity,
I had time to try your example and found out what was missing:
style
instead ofcontainerCustomStyle
(I will push a commit to make it interchangeable){ flex: 1 }
withslideStyle
Here is the updated code:
@bd-arc It finally worked after doing this :
I uninstalled and reinstalled react-native-snap-carousel by doing this I could get the item name and index details in a console but still had some errors when I gave
source={item}
so then,I replaced
source={item}
tosource={item.item}
and now the images are displayed