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

211
Views
Parsing Image Import as props to custom component in React native

ImageScreen.js

import imgSrcF from '../../assets/forest.jpg';
import imgSrcB from '../../assets/beach.jpg';
import imgSrcM from '../../assets/mountain.jpg';
 
const ImageScreen = () => {
    // imgageSource={require('../../assets/forest.jpg')} /> 
    return <View>
        <Text>Hello</Text>
        <Image source={{ uri: imgSrcF }} style={style.image} />
        <ImageDetail title='Forest'
            imgageSource={imgSrcF} /> 
    </View>
}
  

Imagedetails.js

const ImageDetail = (props) => {
    console.log(props)
    // <Image source={props.imageSource} />
    return <View>
        <Image source={{ uri: props.imageSource }}
            style={styles.image} />
        <Text> {props.title} </Text>
    </View>
}

Note

The Image Element is showing when the import is in same file.... sample is use in the Screen

Passing Image is not working

Currently running on web...

Result of above code on react native web

Attempted solution link React Native Web Image component not showing image

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!