Skip to content

Addition of style on createAnimateElement arg breaks our propTypes validation #92

@majapw

Description

@majapw

Hi there!

I just started seeing test failures as a result of

style={ApplyAnimatedValues.transformStyles(style)}
which was added in v0.2.2.

Basically, our tests validate prop types (which we always forbid extraneous prop types) and we sometimes pass actual components to Animated.createAnimatedComponents (which have their own prop types definitions). So when style started getting applied to the arg passed in... our tests failed.

Is there any way to maybe export a prop type that can be used for these components or any sort of guidance on this behavior (because we're passing in a component, I don't think the style attribute will even work as expected). Should we not be passing in a component?

Thanks!

FYI @ljharb @backwardok

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions