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

370
Views
Tipo %s fallido: %s%s, prop, prop `fuente` suministrada a `Image` no válida, se esperaba uno del tipo [número]

Estoy tratando de recuperar datos e imágenes del backend del nodo, todo se está recuperando pero no las imágenes y me está dando un error de prop no válido

esta es la pantalla de listado

 function ListScreen(props) { const [listing, setListing] = useState([]); useEffect(() => { loadlistings(); }, []); const loadlistings = async () => { const res = await listingApi.getListing(); setListing(res.data); }; return ( <View styles={styles.container}> <StatusBar styles="auto" /> <FlatList data={listing} keyExtractor={(item) => item._id} renderItem={({ item }) => ( <ListItem title={item.name} //working fine subTitle={item.job} //working fine name="email" name2="phone" image={item.image} //not working /> )} /> </View> ); }

este componente ListItem

 function ListItem({ image, title, subTitle, name, name2 }) { return ( <Pressable> <View style={styles.container}> {image && <Image style={styles.image} source={image} />} <View style={styles.detailsContainer}> <Text style={styles.title}> {title}</Text> <Text style={styles.subTitle}> {subTitle}</Text> {Icon && <Icon name={name} />} {Icon && <Icon name={name2} />} </View> </View> </Pressable> ); }

estos son los datos del backend

 { "_id": "629b5670579b00cd931122e9", "name": "Harry Potter", "job": "BackEnd Developer", "image": "http://192.168.1.40:4545/image/image1654347376236_922911498.jpg", "__v": 0 }, { "_id": "629b568a579b00cd931122eb", "name": "John Wick", "job": "Full Stack Developer", "image": "http://192.168.1.40:4545/image/image1654347402595_708253593.jpg", "__v": 0 }

Por favor, ayuda a cualquiera que esté atascado en esto durante días.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe proporcionar el URI de la imagen pasando un objeto con la clave uri al accesorio de source de <Image /> como:

 <Image style={styles.image} source={{uri: image}} />
about 4 years ago · Juan Pablo Isaza Report
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!