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

Fixed filtering nested animated styles. #2202

Merged
merged 2 commits into from
Jul 21, 2021

Conversation

jmysliv
Copy link
Member

@jmysliv jmysliv commented Jul 20, 2021

Description

flattenArray function was not used during filtering non-animated props, so when the style property in Animated.View was a nested array, the app was crashing. I've changed that so know nested array can be passed as a style property.
Fixes #2188

@jmysliv jmysliv self-assigned this Jul 20, 2021
@jmysliv jmysliv marked this pull request as ready for review July 20, 2021 11:23
@jmysliv jmysliv requested a review from piaskowyk July 20, 2021 11:23
Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@jmysliv jmysliv merged commit 5a8dedb into master Jul 21, 2021
@jmysliv jmysliv deleted the @jmysliv/nested-animated-styles branch July 21, 2021 07:10
@thespacemanatee
Copy link

thespacemanatee commented Oct 29, 2021

Seems to be broken again in 2.2.4, not sure if it's the same issue but some of my styles broke. The offending style combination had a style attribute (fontSize) that was set manually, and an animatedStyle that was animating the same style attribute (fontSize). This didn't cause a crash previously although it did highlight the fact that we had duplicated fontSize stylings.

@renchap
Copy link

renchap commented Nov 12, 2021

@jmysliv I can confirm what @thespacemanatee is seeing, this crashes again on Android (not iOS) if style is an array, with TypeError: property is not configurable on 2.2.4.

Should I open a new issue for this?

@markdalgleish
Copy link

I ran into the same issue, but it looks like this fix landed in v2.3.0-alpha.2 — not available in latest stable version yet (v2.2.4 at time of writing).

@piaskowyk
Copy link
Member

piaskowyk commented Dec 1, 2021

@markdalgleish Probably next week, we will release 2.3.0 as stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android][hermes] Crashes when animated styles are nested two levels deep
5 participants