Skip to content

Conversation

@piaskowyk
Copy link
Member

Summary

The motivation behind this PR was the lack of animation in the web implementation when React.StrictMode was enabled. While debugging, I discovered we had two similar mechanisms for storing connection between components and animations: one for mobile animations and one for web animations. I realized that the native implementation worked flawlessly without any issues on the web as well, as it had been recently refactored to align with React's guidelines. I decided to remove the flawed web implementation and replace it with mobile implementation.

Test plan

  1. Open web-example and check if animations works.
  2. Wrap any web example from example app with <React.StrictMode></React.StrictMode> and see if animations works.

Copy link
Contributor

@m-bert m-bert left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@tjzel tjzel left a comment

Choose a reason for hiding this comment

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

Just blocking it for now because I know this code more in-depth and want to review it properly before we merge it. 🙏

Copy link
Collaborator

@tjzel tjzel left a comment

Choose a reason for hiding this comment

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

We need some TS fixes for these changes in the pipeline, but it's of the least concern for now. Beside this, all is solid!

@piaskowyk piaskowyk enabled auto-merge July 2, 2024 07:37
@piaskowyk piaskowyk added this pull request to the merge queue Jul 2, 2024
Merged via the queue into main with commit 13cc431 Jul 2, 2024
@piaskowyk piaskowyk deleted the @piaskowyk/strict-mode-animation-fix branch July 2, 2024 07:38
@tjzel tjzel mentioned this pull request Jul 8, 2024
r0h0gg6 pushed a commit to r0h0gg6/react-native-reanimated that referenced this pull request Jul 28, 2025
## Summary

The motivation behind this PR was the lack of animation in the web
implementation when React.StrictMode was enabled. While debugging, I
discovered we had two similar mechanisms for storing connection between
components and animations: one for mobile animations and one for web
animations. I realized that the native implementation worked flawlessly
without any issues on the web as well, as it had been recently
refactored to align with React's guidelines. I decided to remove the
flawed web implementation and replace it with mobile implementation.

## Test plan

1. Open web-example and check if animations works.
2. Wrap any web example from example app with
`<React.StrictMode></React.StrictMode>` and see if animations works.
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.

4 participants