Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastImage for Avatar #999

Closed
artyorsh opened this issue Apr 10, 2020 · 5 comments · Fixed by #1055
Closed

FastImage for Avatar #999

artyorsh opened this issue Apr 10, 2020 · 5 comments · Fixed by #1055

Comments

@artyorsh
Copy link
Collaborator

artyorsh commented Apr 10, 2020

🚀 Feature Proposal

It would be nice to use react-native-fast-image for avatar component.

Motivation

This library includes caching and other features needed in a real-world applications.

Example

import { Avatar } from '@ui-kitten/components';

const YourImage = () => (
  <Avatar
    size='giant'
    source={{ uri: 'https://unsplash.it/400/400?image=1' }}
  />
)
@lesmo
Copy link

lesmo commented Apr 13, 2020

Better yet... how about being able to use a custom Image component? react-native-fast-image is cool, but it could also be nice to have react-native-fade-in-image or react-native-image-progress - I personally wrap react-native-fast-image in lots of scenarios to do a Fade In effect or some other things.

I think something like the Icon component API would be cool.

@artyorsh
Copy link
Collaborator Author

@lesmo thanks for the details. Yes this makes more sense to extend this with a property, but it requires other libraries to be compatible at least with a props that the default Image accepts. I won't to create a middlewares to support each of them :D So what I think is use a component prop which accepts a class component, like it is implemented in lists, e.g with ListHeaderComponent. This way users can do all the specific library things in a separate component.

@lesmo
Copy link

lesmo commented Apr 14, 2020

That's even better. You could even use a <Video> component... 😜

@artyorsh artyorsh mentioned this issue Apr 25, 2020
2 tasks
@artyorsh artyorsh linked a pull request Apr 26, 2020 that will close this issue
2 tasks
@kockok
Copy link

kockok commented Apr 5, 2021

What's the exact implementation for fastimage?

I couldn't get it to work by filling the component prop with a fastimage element.

Screen Shot 2021-04-05 at 6 03 33 PM

@artyorsh
Copy link
Collaborator Author

artyorsh commented Apr 5, 2021

@kockok you should use ImageComponent and not component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants