-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Test two ways to use sharedValue in useAnimatedStyle
#5893
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useAnimatedSyle
useAnimatedSyleuseAnimatedStyle
szydlovsky
approved these changes
Apr 30, 2024
Contributor
szydlovsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - left just a super small cosmetic comment
app/src/examples/RuntimeTests/tests/snapshotTests/easing.test.tsx
Outdated
Show resolved
Hide resolved
GSTJ
referenced
this pull request
in GSTJ/react-native-magic-modal
May 25, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-native-reanimated](https://github.com/software-mansion/react-native-reanimated) | [`~3.10.1` -> `~3.11.0`](https://renovatebot.com/diffs/npm/react-native-reanimated/3.10.1/3.11.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-reanimated (react-native-reanimated)</summary> ### [`v3.11.0`](https://github.com/software-mansion/react-native-reanimated/releases/tag/3.11.0) [Compare Source](https://github.com/software-mansion/react-native-reanimated/compare/3.10.1...3.11.0) #### What's Changed - Fix EXC_BAD_ACCESS crash on iOS in `[REAAnimationsManager clearSharedTransitionConfigForTag:]` by [@​tomekzaw](https://github.com/tomekzaw) in [https://github.com/software-mansion/react-native-reanimated/pull/5975](https://github.com/software-mansion/react-native-reanimated/pull/5975) - Fix uncaught exception 'NSUnknownKeyException' on app reload on iOS by [@​tomekzaw](https://github.com/tomekzaw) in [https://github.com/software-mansion/react-native-reanimated/pull/5976](https://github.com/software-mansion/react-native-reanimated/pull/5976) - Test two ways to use sharedValue in `useAnimatedStyle` by [@​Latropos](https://github.com/Latropos) in [https://github.com/software-mansion/react-native-reanimated/pull/5893](https://github.com/software-mansion/react-native-reanimated/pull/5893) - docs: fix grammar by [@​wodin](https://github.com/wodin) in [https://github.com/software-mansion/react-native-reanimated/pull/5978](https://github.com/software-mansion/react-native-reanimated/pull/5978) - fix: build issues on visionOS by [@​okwasniewski](https://github.com/okwasniewski) in [https://github.com/software-mansion/react-native-reanimated/pull/5980](https://github.com/software-mansion/react-native-reanimated/pull/5980) **Full Changelog**: software-mansion/react-native-reanimated@3.10.0...3.11.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/GSTJ/react-native-magic-modal). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This was referenced Jun 25, 2024
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
In many animations we have two ways of implementing them - we can use withTiming either inside
useAnimatedStyleor outside. For simplicity I've decided to name test cases withuseAnimatedStyleactively updating shared value as "ACTIVE", and if fromuseAnimatedStylewe observe it I call test case "PASSIVE". So these test cases are either ACTIVE or PASSIVE from the point of view of the hookuseAnimatedStyleTest plan