Styling issue with Card element after upgrading to RN 0.50
See original GitHub issueDescription
- I have a
Card
element inside aFlatList
. I had this working last week, it has crashed AFTER an upgrade I did yesterday to React Native 0.50. I also Had to replace the wrapper element of the FlatList for aView
, I had aList
, but after I upgraded it showed a white background as well. WithView
it works as you can see on SS.
Version:
"react-native": "0.50.4",
"react-native-elements": "^0.18.4",
Sample Code
return(
<View style={styles.list}>
{ this.state.loaded ?
<FlatList
data={this.state.data}
renderItem={ ({item}) =>
<TouchableWithoutFeedback
onPress={
() => this.props.navigation.navigate('RecipeInfo', {'uri': item.recipe.uri})
}
>
<View>
<Card
style={itemsUserStyles.card}
title={item.recipe.label}
titleStyle={itemsUserStyles.title}
image={{uri: item.recipe.image}}
>
<View style={[itemsUserStyles.recipeTagsContainer]}>
{
(item.recipe.dietLabels.concat(item.recipe.healthLabels)).map((tag, i) => {
return (
<Text
key={i}
style={itemsUserStyles.recipeTags}
>
{tag}
</Text>
)
})
}
</View>
</Card>
</View>
</TouchableWithoutFeedback>
}
keyExtractor={item => item.recipe.uri}
/>
:
<View style={styles.spinnerContainer}>
<ActivityIndicator color="#ea4e3c" size={1} />
</View>
}
</View>
);
As you can see, I’m getting a default white background for Card
element, which I cannot replace for transparent, it just doesn’t work! I presume this is because I updated to RN 0.50. Since Last week I still used .49 and this didn’t happen.
Thanks a lot for your time/help.
- F
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Card Payment renders without style · Issue #248 - GitHub
Summary I try to render And it only renders the Card Number, Date, and CVV inputs, with No Styling at all. I do...
Read more >react-stripe-elements styling Card Element - Stack Overflow
I'm using the module react-stripe-elements and I want to style the CardElement to create something like the attached.
Read more >react-native-elements | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >Boost Your User Experience with Lottie for React Native
We've encountered problems where animation “doubles” the style properties. This can mean that your “let's add 50px margin over there” may turn ...
Read more >React Native development tools - Part 3: Testing tools - Pusher
While I was testing it though, I had problems getting Detox to work for React Native version 0.51. That's why we're sticking with...
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 Free
Top 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
cc @xavier-villelegier
@iRoachie - yes sir! That’s the fix for it. Closing this one. Thanks a lot for the time guys.
Hey @fsunset the prop for styling the container is called
containerStyle
. Can you try using that instead ofstyle
?