-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
How to set as require() within Image component? #36
Comments
Hi, I'd try to wrap the icon in an |
@oblador Here is a gist of how I am trying to use Icon.getImage - https://gist.github.com/tgoldenberg/5f9185111972d9d412cf. I tested to make sure the regular Icons are working, so it's a little confusing. Also, if I used the Animated.Image component, then the icon would still stay the same size, when what I want is the icon to adjust size for the bounce effect. Do you see a solution to this? |
You are not referencing the icon you created, try |
@oblador Yeah, with that change it still produces no content. I also tried having an if / else statement to make sure that an undefined value doesn't get passed as the uri, but nothing. Could you maybe post an example that works? I think it would be very useful. |
Well you're not using your
|
Ugh, this is frustrating, but I already did that. I modified the original file to make a brief example and must have left that part out. Sorry for not providing a good example, but I'm pretty sure I am following the other instructions. If you or someone else can get something working locally and verify, that would probably be the best way. |
Lol, I did verify it locally. |
So I updated the gist. I'm not even able to render the |
Now I'm able to use the |
Dude, I'd suggest you read the docs and the examples from React Native. The absolute easiest way is to use
|
@oblador, Yes, the Animated.View works, but doesn't achieve what I want to achieve, which is to modify the transform of the icon. Can you please put an example using |
But it does work! You need help with RN basics and it seems I can't help you realize that. This is not a bug so try SO and see if they are more pedagogic. |
@oblador I thank you for the help. I was able to get it working by wrapping it in an Animated.View. However, I would disagree that this isn't a bug. There is no documentation in the examples for having an |
I would like to use the RN doc example for a bounce effect on an
<Icon/>
. However, the Facebook example uses an Animated.Image component. I tried setting the source to the<Icon/>
but with no luck at all. Could you give an example of how to do so?Thanks!
The text was updated successfully, but these errors were encountered: