Load image passed as props react native

前端 未结 7 1343
清歌不尽
清歌不尽 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:32

    You can place Image directly in the Component, as a prop children.

    
            
    
    

    The Component A will be composed of

    function ComponentA(props) {
        return ( {props.children} ); 
     }
    

    This will render the image.

提交回复
热议问题