question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to change "container" element on Image component

See original GitHub issue

Is your feature request related to a problem? Please Describe. A clear and concise description of what the problem is. Ex. I’m always frustrated when […] Sometimes I want to animate the Image component and its parent/wrapper component, I’d have to wrap the Image with another Animated.View and add animated values to the this Animated.View style props. containerStyle on the Image component refers to a normal non-animated View so adding animated value to containerStyle results in an error.

Describe the solution you’d like A clear and concise description of what you want to happen. Add a container prop to Image component that will receive a different component other than View. Allowing modifying the container using prop will reduce the hierarchy to the component tree.

Describe alternatives you’ve considered A clear and concise description of any alternative solutions or features you’ve considered. If a container prop doesn’t cut it, allow a prop to notify the Image component that its parent should be an Animated component. However, I think this alternative approach would be bad because there is not one defactor Animation library out there. How to determine which Animated API to use would be a hassle. (or impossible)

Additional context Add any other context or screenshots about the feature request here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
nartccommented, Jul 15, 2019

@iRoachie I’ve solved the issue. Turned out it’s just some animations problem on my part. Thanks for your time.

0reactions
iRoachiecommented, Jul 14, 2019

Can you update them? Sorry about that. You can actually add your gifs here in the issue. Github will upload them

Read more comments on GitHub >

github_iconTop Results From Across the Web

Component-level art direction with CSS Container Queries
Container Queries (CQ) allow us to change the styles of a component so it responds to the size of its nearest container.
Read more >
How to fill a box with an image without distorting it
In this guide you can learn a technique for causing an HTML image to completely fill a box.
Read more >
How do I auto-resize an image to fit a 'div' container?
Just put the image in a div and then in the HTML file where you specify the image. Set the width and height...
Read more >
How to Auto-Resize the Image to fit an HTML Container
Create a <div> element with a class "box". Set the URL of your image in the <img> tag with the src attribute and...
Read more >
Enable styling of next/image outer wrapper #22861 - GitHub
Styles added to the Image component get applied directly to the inner img element. However some of the most common styles you would...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found