I'd like to pass an uri of an Image as a props in React native.
My code looks like this in the child component :
const ButtonIcon= ({ uri }) => { return ( <Image style={{ width: 24, height: 24, resizeMode: 'contain', }} source={{ uri:{uri} }}/> ) }
Here is the code in the parent component :
<ButtonIcon uri="../assets/googleicon.png" /> <ButtonIcon />
I have a message saying JSON value "..." cannot be converted to a valid URL. Anybody can help please? I'm using expo with react native. Thank you.