I am adding two props (textProp & imgProp) to my custom component, but I keep on getting this error JSX expression must have one parent element
. This is what I have soo far
function TextImg(textprop, imgprop) {
return(
<Text>{textprop.text}</Text>
<Image source={imgprop.imageUri}></Image>
);
}
I tried using div, but this doesn't seem to work. Thanks in advance!
Wrap this section in a React.Fragment
JSX needs a container like this