Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
Why wont <Card> behave correctly

In my React Native app the <Card> component from react-native-paper doesn't appear as it does in examples:

Screenshot

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;

CardItem.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;

Styles.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;

I've tried changing styles.card many times but it still wont change.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!