minor update to the AnimatedNumber component to ensure that a defaultValue property is included in the animated props#564
Merged
Merged
Conversation
Co-authored-by: jamespepper81 <84083764+jamespepper81@users.noreply.github.com>
…s (Reanimated v4) Co-authored-by: jamespepper81 <84083764+jamespepper81@users.noreply.github.com>
…cies Fix Reanimated v4 useAnimatedProps type error in AnimatedNumber
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request attempts to add a defaultValue property to the animated props returned by useAnimatedProps in the AnimatedNumber component. However, the change raises concerns about the correctness of mixing controlled and uncontrolled component patterns in react-native-reanimated. The PR also includes extensive package-lock.json reorganization that appears unrelated to the stated purpose.
Changes:
- Modified
AnimatedNumber.tsxto includedefaultValuealongsidetextinuseAnimatedPropsreturn value - Extensive reorganization of "peer": true markers in package-lock.json (appears to be from running npm install)
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| components/AnimatedNumber.tsx | Added defaultValue: text to the object returned by useAnimatedProps, which may conflict with the animated text property |
| package-lock.json | Extensive reorganization of peer dependency markers throughout the file, unrelated to the AnimatedNumber change |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…in AnimatedNumber Co-authored-by: jamespepper81 <84083764+jamespepper81@users.noreply.github.com>
Fix TypeScript build error in AnimatedNumber: Reanimated 4.x virtual `text` prop
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
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.
This pull request makes a minor update to the
AnimatedNumbercomponent to ensure that adefaultValueproperty is included in the animated props, likely to improve rendering consistency or compatibility.defaultValueto the returned object in theuseAnimatedPropshook withinAnimatedNumber.tsx.