react-native-better-image icon indicating copy to clipboard operation
react-native-better-image copied to clipboard

Patch 2 Updated with Custom Image Component

Open krunalbad opened this issue 4 years ago • 12 comments

krunalbad avatar Dec 25 '20 17:12 krunalbad

@krunalbad React Native Fast Image has too many issues which is why I didn't add it to the package. May be we can think of a different approach to allow people use their own image components?

DaniAkash avatar Dec 27 '20 05:12 DaniAkash

Yeah we can try that approach! Great suggestion!

krunalbad avatar Dec 27 '20 15:12 krunalbad

Added possible feature! Please review!

krunalbad avatar Dec 27 '20 15:12 krunalbad

Thanks @krunalbad Now that we are allowing custom components, we need to also ensure prop types are properly displayed based on the component

DaniAkash avatar Dec 29 '20 04:12 DaniAkash

What are you suggesting? @DaniAkash

krunalbad avatar Dec 31 '20 05:12 krunalbad

I have tested it on multiple devices of both platforms so far it worked great. One another feature we can add is onLayout as it common for most of the 3rd pkgs out there and even for Image. Let me know your concern. It will help much better in application development!

krunalbad avatar Jan 03 '21 07:01 krunalbad

I have tested it on multiple devices of both platforms so far it worked great. One another feature we can add is onLayout as it common for most of the 3rd pkgs out there and even for Image. Let me know your concern. It will help much better in application development!

BetterImage extends all the props of regualar image component including onLayout. This should work out of the box

DaniAkash avatar Jan 17 '21 08:01 DaniAkash

What are you suggesting? @DaniAkash

Try if you can infer prop types based on the component using typescript

DaniAkash avatar Jan 17 '21 08:01 DaniAkash

I have tested it on multiple devices of both platforms so far it worked great. One another feature we can add is onLayout as it common for most of the 3rd pkgs out there and even for Image. Let me know your concern. It will help much better in application development!

BetterImage extends all the props of regualar image component including onLayout. This should work out of the box

Yeah I noticed! Great! Most of the pkgs have this onLayout common. As there are already otherProps sent to it, so it should work for all quite good.

krunalbad avatar Jan 17 '21 10:01 krunalbad

What are you suggesting? @DaniAkash

Try if you can infer prop types based on the component using typescript

Sure I'll look into it!

krunalbad avatar Jan 17 '21 10:01 krunalbad

@DaniAkash Am I missing something here?

krunalbad avatar Jan 23 '21 18:01 krunalbad

Are you suggesting this change? @DaniAkash From imageComponent?: Component; to imageComponent?: ReactElement; or is it something else ? let me know what am i missing here!

krunalbad avatar Apr 03 '21 13:04 krunalbad