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

Fixes a crash caused by the reanimated library object freeze #867

Closed
wants to merge 1 commit into from

Conversation

Max2817
Copy link

@Max2817 Max2817 commented Jul 4, 2023

Description

Since Reanimated 3.0 they added shareables.ts recursively freezing objects that can possibly share values and one of it is windowCorrectionConfig we mutate. If we use Reanimated.ScrollView inside renserScrollComponent props then we get the error that we cannot mutate windowCorrectionConfig.applyToInitialOffset.

To get around this issue, we don't mutate windowCorrectionConfig directly, instead we create a new windowCorrectionConfig object with the updated values and reassign it.

Reproducing the case in Fixture would have needed to update Reanimated and React-Native which was not easily doable with the time we had.

Reviewers’ hat-rack 🎩

  • [ ]

Screenshots or videos (if needed)

Checklist

@Max2817 Max2817 closed this Jul 4, 2023
@Max2817 Max2817 reopened this Jul 4, 2023
@Max2817 Max2817 marked this pull request as draft July 4, 2023 10:02
@Max2817 Max2817 marked this pull request as ready for review July 5, 2023 13:22
@Max2817 Max2817 force-pushed the fix-reanimated-freeze-crash branch from e88812a to 046adc9 Compare July 5, 2023 13:26
@greatscotty greatscotty deleted the fix-reanimated-freeze-crash branch March 12, 2024 19:03
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.

2 participants