Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

React Native Typescript styled components error

$
0
0

I keep getting the following error when trying to use styled components in react native and typescript:

WARN  Possible Unhandled Promise Rejection (id: 1):Error: Directory for 'file:///Users/me/Library/Developer/CoreSimulator/Devices/12EBA58B-1919-42F7-A255-0AB501875563/data/Containers/Data/Application/8BD96CA0-A291-4840-A694-EB6F0D92867F/Library/Caches/ExponentExperienceData/%2540anonymous%252FDrinklink-c6446bc2-812f-446d-b2ff-ff09cb07de2a/ExponentAsset-b62641afc9ab487008e996a5c5865e56.ttf' doesn't exist.

Installed with:yarn add @types/styled-components-react-nativeSo I have version 5.1.3

Imported by:import styled from "styled-components/native";

Styled component code:

const Title = styled.Text`  padding: 16px;`;export type Props = {  vendor: any;};const VendorInfo: React.FC<Props> = ({ vendor }) => {  const { title, image } = vendor;  return (<Card elevation={5} style={styles.card}><Card.Cover style={styles.cover} source={{ uri: image }} /><Title>{title}</Title></Card>  );};

Ive tried various things to get styled components react native to work and so far have had no luck. Appreciate any suggestions.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>