En mi aplicación React Native, el componente <Card> de react-native-paper no aparece como en los ejemplos:
ListScreen.js:
import React from 'react'; import { View, ScrollView } from 'react-native'; import NavBar from '../NavBar'; import CardItem from '../CardItem'; import styles from '../../Assets/Styles'; const ListScreen = () => ( <View style={styles.view}> <ScrollView> <CardItem title="Card 1" content="Hello World!" /> <CardItem title="Another Card" content="idk bye" /> <CardItem title="Yes" content="Pls work pls." /> <CardItem title="Card 2" content="Hello World!!" /> </ScrollView> <NavBar /> </View> ); export default ListScreen;Elemento de tarjeta.js:
import React from 'react'; import { Card, Paragraph } from 'react-native-paper'; import styles from '../Assets/Styles'; const CardItem = (props) => ( <Card style={styles.card}> <Card.Title title={props.title} /> <Card.Content> <Paragraph>{props.content}</Paragraph> </Card.Content> </Card> ); export default CardItem;Estilos.js:
import { StyleSheet } from 'react-native'; const styles = StyleSheet.create({ navbar: { position: 'absolute', left: 0, right: 0, bottom: 0, }, view: { flex: 1, alignItems: 'center', justifyContent: 'center', }, card: {}, }); export default styles; Intenté cambiar la tarjeta de styles.card muchas veces, pero aún no cambia.