vovkasm / react-native-web-image

An image component for react-native with persistent disk and memory caching.
MIT License
146 stars 25 forks source link

Feature/success loaded event #13

Open bachphuc opened 6 years ago

bachphuc commented 6 years ago

Hi.

First, thank for great library. I always use this library for any react-native project. But I see only error event and there's no success event, it's not enough for my project, I want to know when image loaded so I add success event for both android and ios to your library and hope this hope others.

Thank you so much Regards

vovkasm commented 6 years ago

Thank you! Very good. I need couple of days to tune the formatting and check it before merge. Again thank you very much!

vovkasm commented 6 years ago

Sorry for long delay. Thank you! Merged to develop branch, with some changes. I plan to rename onSuccess to onLoad before release to be more in line with original RN component, is it ok?

And another question, you send type property in onSuccess event with value cache when resource was loaded from cache (only for iOS). Do you really use this functional and for what? Because I think we can have better api for this information, but interested in any usecases... And in case this property was not very useful, I'd prefer to not send it while...

bachphuc commented 6 years ago

Hi, so sorry for late response. Yes, rename onSuccess to onLoad it's ok. I use type "cache" to know that it's loaded from cache or direct from uri (no cache), maybe it will be helpful for some case :D but not in my app . Only addition information