ascoders / react-native-image-viewer

🚀 tiny & fast lib for react native image viewer pan and zoom
MIT License
2.44k stars 577 forks source link

useNativeDriver Warning #427

Open dl-husky73 opened 3 years ago

dl-husky73 commented 3 years ago

I am using ver 3.0.1 New to this component, works well except I am getting the useNativeDriver warning. Seems this is a popular topic but I don't see any guidance/documentation on the exact solution.

Any help would be appreciated.

dl-husky73 commented 3 years ago

Thought I would add the code segment: import ImageViewer from 'react-native-image-zoom-viewer';

<Modal visible={gIsModalVisible} transparent={false} animationType="slide" onRequestClose={() => setGIsModalVisible(false)}> <ImageViewer imageUrls={gPicturesViewer} index={gPicturesIndex} backgroundColor={'#23321A'} enableSwipeDown onSwipeDown={() => setGIsModalVisible(false)} onCancel={() => setGIsModalVisible(false)} enableImageZoom={true} renderFooter={renderFooter} footerContainerStyle={styles.dotHeader4} useNativeDriver />

I tried setting useNativeDriver={true}, useNativeDriver={false} and useNativeDriver. None stopped the warning. useNativeDriver does not show up as a valid property for ImageViewer in Visual Studio Code so I am thinking there is an issue.

BlackCat1397 commented 3 years ago

@dl-husky73 As you can see this package utilizes Animated lib. They made setting useNativeDriver prop required. So package owner should create corresponding prop in components. You can help by forking this project, fixing the issue and creating pull request.

image