React-native failed propType on Image component
You should either require the local assets or use object with uri
key.
So either in MainComponent
:
this.state = { images:[ require('./src/images/1.png'), require('./src/images/2.png'), require('./src/images/3.png') ]}
or in BasicComponent
:
return ( <Image source={{uri: this.props.source}} />);
you should be use uri for set source image
return ( <Image source={{uri: 'https://reactnative.dev/docs/assets/p_cat2.png'}} />);