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

Set collapse property before starting an animation that uses the native driver #25361

Closed
wants to merge 1 commit into from

Commits on Jun 24, 2019

  1. Set collapse property to false when using createAnimatedComponent()

    Depending on the style props of an Animated.View it may be optimised away
    by the NativeViewHierarchyOptimizer, which will make the animation to
    fail, because the native view is virtual (it does not exists
    in the native view hierarchy).
    Although the createAnimatedComponent already sets the collapsable property
    based on the this._propsAnimated.__isNative flag, it won't work on all
    cases, since the __isNative flag is only set when one starts the animation.
    Which won't cause a re-render to occuor, thus not setting the collapsable
    property to false.
    In order to prevent this issue the HOC will just set the collapsable property
    to false.
    cabelitos committed Jun 24, 2019
    Configuration menu
    Copy the full SHA
    c3e8e40 View commit details
    Browse the repository at this point in the history