Skip to content

Allow to change "container" element on Image component #1908

@nartc

Description

@nartc

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions