您可以简单地传递任何组件,即
import Slideshow from 'react-native-slideshow';
import {Image} from 'react-native'
// ...
render() {
return (
<Slideshow
dataSource={[
{ url:'http://placeimg.com/640/480/any' },
{ url:'http://placeimg.com/640/480/any' },
{ url:'http://placeimg.com/640/480/any' }
]}
arrowLeft={<Image source={require(PATH_TO_LEFT_ICON)}/>}
arrowRight={<Image source={require(PATH_TO_RIGHT_ICON)}/>}/>
);
}
**我使用图像作为组件,你可以使用任何你想要的。
现在你可以走了。