-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Give more meaningful warning when modifying a Shareable #5548
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
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
tomekzaw
requested changes
Jan 2, 2024
Member
tomekzaw
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.
Certainly a PR that we all need and deserve, let's just polish some rough edges.
635b72e to
e9e9bf5
Compare
Collaborator
Author
tomekzaw
reviewed
Jan 5, 2024
piaskowyk
reviewed
Jan 9, 2024
piaskowyk
approved these changes
Jan 12, 2024
Member
piaskowyk
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.
For me is ok 👌
tomekzaw
reviewed
Feb 23, 2024
tomekzaw
reviewed
Feb 23, 2024
tomekzaw
reviewed
Feb 23, 2024
tomekzaw
approved these changes
May 8, 2024
renovate bot
referenced
this pull request
in GSTJ/react-native-magic-modal
Jun 3, 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.11.0` -> `~3.12.0`](https://renovatebot.com/diffs/npm/react-native-reanimated/3.11.0/3.12.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.12.0`](https://github.com/software-mansion/react-native-reanimated/releases/tag/3.12.0) [Compare Source](https://github.com/software-mansion/react-native-reanimated/compare/3.11.0...3.12.0) #### What's Changed - Give more meaningful warning when modifying a Shareable by [@​tjzel](https://github.com/tjzel) in [https://github.com/software-mansion/react-native-reanimated/pull/5548](https://github.com/software-mansion/react-native-reanimated/pull/5548) - Make animated components use different tags for events by [@​szydlovsky](https://github.com/szydlovsky) in [https://github.com/software-mansion/react-native-reanimated/pull/5960](https://github.com/software-mansion/react-native-reanimated/pull/5960) - Add `warning` and `failing` test decorators by [@​Latropos](https://github.com/Latropos) in [https://github.com/software-mansion/react-native-reanimated/pull/5929](https://github.com/software-mansion/react-native-reanimated/pull/5929) - Update useAnimatedKeyboard docs by [@​maciekstosio](https://github.com/maciekstosio) in [https://github.com/software-mansion/react-native-reanimated/pull/5866](https://github.com/software-mansion/react-native-reanimated/pull/5866) - Change the docs to mention, that `.springify()` works with `.duration()` by [@​Latropos](https://github.com/Latropos) in [https://github.com/software-mansion/react-native-reanimated/pull/5990](https://github.com/software-mansion/react-native-reanimated/pull/5990) - \[Android]\[Keyboard] More consistent inequality check to compute keyboard state by [@​antFrancon](https://github.com/antFrancon) in [https://github.com/software-mansion/react-native-reanimated/pull/5874](https://github.com/software-mansion/react-native-reanimated/pull/5874) - fix typo on object key for `targetValues` in custom-animations.mdx by [@​JDMathew](https://github.com/JDMathew) in [https://github.com/software-mansion/react-native-reanimated/pull/5994](https://github.com/software-mansion/react-native-reanimated/pull/5994) - Remove outdated code for unsupported React Native versions by [@​tomekzaw](https://github.com/tomekzaw) in [https://github.com/software-mansion/react-native-reanimated/pull/5979](https://github.com/software-mansion/react-native-reanimated/pull/5979) - Remove REAInitializer by [@​tomekzaw](https://github.com/tomekzaw) in [https://github.com/software-mansion/react-native-reanimated/pull/5681](https://github.com/software-mansion/react-native-reanimated/pull/5681) - Prevent crash on non-existent view updates in Android by [@​thomas-rx](https://github.com/thomas-rx) in [https://github.com/software-mansion/react-native-reanimated/pull/5767](https://github.com/software-mansion/react-native-reanimated/pull/5767) - Fix location after shared element transition by [@​piaskowyk](https://github.com/piaskowyk) in [https://github.com/software-mansion/react-native-reanimated/pull/6010](https://github.com/software-mansion/react-native-reanimated/pull/6010) - Make `useScrollviewOffset` ref nullable and simplify its code by [@​szydlovsky](https://github.com/szydlovsky) in [https://github.com/software-mansion/react-native-reanimated/pull/6009](https://github.com/software-mansion/react-native-reanimated/pull/6009) - fix: use proper classes for bridgeless by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-reanimated/pull/5997](https://github.com/software-mansion/react-native-reanimated/pull/5997) - docs: add [@​swmansion/t-rex-ui](https://github.com/swmansion/t-rex-ui) by [@​patrycjakalinska](https://github.com/patrycjakalinska) in [https://github.com/software-mansion/react-native-reanimated/pull/6015](https://github.com/software-mansion/react-native-reanimated/pull/6015) - Remove `CellRendererComponent` from Animated.FlatList props by [@​Latropos](https://github.com/Latropos) in [https://github.com/software-mansion/react-native-reanimated/pull/5951](https://github.com/software-mansion/react-native-reanimated/pull/5951) - Add `useComposedEventHandler` hook by [@​szydlovsky](https://github.com/szydlovsky) in [https://github.com/software-mansion/react-native-reanimated/pull/5890](https://github.com/software-mansion/react-native-reanimated/pull/5890) - Align handling colors with RN by [@​maciekstosio](https://github.com/maciekstosio) in [https://github.com/software-mansion/react-native-reanimated/pull/5825](https://github.com/software-mansion/react-native-reanimated/pull/5825) - Add more tests - useSharedValue, useAnimatedStyle , useDerivedValue by [@​Latropos](https://github.com/Latropos) in [https://github.com/software-mansion/react-native-reanimated/pull/5981](https://github.com/software-mansion/react-native-reanimated/pull/5981) - Make animation RollInLeft work with modifers by [@​Latropos](https://github.com/Latropos) in [https://github.com/software-mansion/react-native-reanimated/pull/6039](https://github.com/software-mansion/react-native-reanimated/pull/6039) - Test predefined entering animation by [@​Latropos](https://github.com/Latropos) in [https://github.com/software-mansion/react-native-reanimated/pull/5995](https://github.com/software-mansion/react-native-reanimated/pull/5995) - Tests: cancelAnimation, useFrameCallback, measure, withDecay by [@​Latropos](https://github.com/Latropos) in [https://github.com/software-mansion/react-native-reanimated/pull/6016](https://github.com/software-mansion/react-native-reanimated/pull/6016) - docs: fix useAnimatedKeyboard page crash by [@​patrycjakalinska](https://github.com/patrycjakalinska) in [https://github.com/software-mansion/react-native-reanimated/pull/6056](https://github.com/software-mansion/react-native-reanimated/pull/6056) - \[Web LA] Remove `existingTransform` by [@​m-bert](https://github.com/m-bert) in [https://github.com/software-mansion/react-native-reanimated/pull/6060](https://github.com/software-mansion/react-native-reanimated/pull/6060) #### New Contributors [@​antFrancon](https://github.com/antFrancon), [@​JDMathew](https://github.com/JDMathew), [@​thomas-rx](https://github.com/thomas-rx), [@​exploIF](https://github.com/exploIF) #### 🙌 Thank you for your contributions! **Full Changelog**: software-mansion/react-native-reanimated@3.11.0...3.12.0 Package build: https://github.com/software-mansion/react-native-reanimated/actions/runs/9287839734 </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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Collaborator
Author
|
@giantslogik It's fixed. |
This was referenced Jun 25, 2024
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
Wanted to open this PR for a long time.
Currently we use
Object.freezein development on objects after they were converted to a Shareable. This is problematic for users since there is no information about why is the object immutable all of a sudden.While this PR won't give a meaningful error when user tries to add a new property to the object when doing something like:
but it seems to be a rare case and mostly the problems are with modifying existing properties.
Test plan