Load image passed as props react native

前端 未结 7 1348
清歌不尽
清歌不尽 2021-01-04 20:02

When I am trying to load image from props i am getting the following error warning: failed prop type: invalid prop source supplied to image

相关标签:
7条回答
  • 2021-01-04 20:46
    <Image
                source={this.props.imgUri}
                style={{
                  height: 30,
                  width: 30,
                  resizeMode: 'contain',
                }}
              />
    

    call it

     <StyledInput text="NAME" imgUri={require('../assets/userIcon.png')} ></StyledInput> 
    
    0 讨论(0)
提交回复
热议问题