Avatar integrate with react-native-fast-image #5177
Replies: 7 comments
-
Hi @Alice-space, Thanks for the suggestion adding |
Beta Was this translation helpful? Give feedback.
-
yeah, but I mean can you provide an interface to render image using custom image component instead of react native default one. @Viraj-10 And thank you for your excellent work. This is a great lib that I use in my app. |
Beta Was this translation helpful? Give feedback.
-
Hi @Alice-space, Thanks for the reply we will consider it while planning future sprints. |
Beta Was this translation helpful? Give feedback.
-
I'd love this as well. It's okay for me if you don't support fast-image out of the box but it'd be good to have an interface to replace the image component for any we want. Edit: diff --git a/src/components/primitives/Image/index.tsx b/src/components/primitives/Image/index.tsx
index edd15a80fee681fc89f5f30a805b4aebf06af322..951e61f2c39ee4189633b6f078f51e645efe8052 100644
--- a/src/components/primitives/Image/index.tsx
+++ b/src/components/primitives/Image/index.tsx
@@ -1,12 +1,13 @@
import React, { useState, memo, forwardRef, useCallback, useRef } from 'react';
import { Image as RNImage } from 'react-native';
+import FastImage from "react-native-fast-image";
import Text from '../Text';
import { usePropsResolution } from '../../../hooks/useThemeProps';
import type { IImageProps } from './types';
import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
import { makeStyledComponent } from '../../../utils/styled';
-const StyledImage = makeStyledComponent(RNImage);
+const StyledImage = makeStyledComponent(FastImage);
const Image = memo(
forwardRef((props: IImageProps, ref: any) => { |
Beta Was this translation helpful? Give feedback.
-
+1 for this, we do some homebrewed caching of images and being able to use our image own components with NB's avatar would be awesome |
Beta Was this translation helpful? Give feedback.
-
+1 for this, would be a nice feature. Looking forward to try it! |
Beta Was this translation helpful? Give feedback.
-
Is there any way official way to do this without needing to patch the package? |
Beta Was this translation helpful? Give feedback.
-
Description
It would be great to include react-native-fast-image in image-related components for better image experience
Problem Statement
It would be great to include react-native-fast-image in image-related components for better image experience
Proposed Solution or API
It would be great to include react-native-fast-image in image-related components for better image experience
Alternatives
No response
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions