-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
Description
The following throws an error: Error: TypeError: Cannot read property 'width' of undefined
<View fixed render={({ pageNumber }) => {
// I added this
if (pageNumber === 1) {
return <View style={{ height: 150, backgroundColor: 'blue' }}><Text>{pageNumber}</Text></View>
}
return <View style={{height: 50, width: 50}}><Image
style={styles.image}
src="/images/quijote1.jpg"
/></View>
Ref: repl
It starts working fine when Image is not used in the render prop. What is a work around for this?
arahansen, ajitbohra, mb-cai, santialbo, MGorgas and 1 more