react-native-stylesheet

React Native Reusable Card Component won't Visualize as expected

本小妞迷上赌 提交于 2021-02-10 14:47:30
问题 Hello there I'm new to react native. I'm trying to create reusable component, not only card component, maybe in future will create other reusable components. Below is the code example of reusable card component that I've created: Card.js import React from 'react'; import { View, StyleSheet } from 'react-native'; const Card = props => { return ( <View style={{...styles.card, ...props.style}}>{props.children}</View>);}; const styles = StyleSheet.create({ card: { shadowColor: 'black',