-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: Remove deprecated prop adapters #8057
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
base: main
Are you sure you want to change the base?
Conversation
nativeProps?: string[] | ||
): AnimatedPropsAdapterFunction; | ||
|
||
export function createAnimatedPropAdapter( |
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.
Do we really want to completely remove createAnimatedPropAdapter
function now? How about keeping it as a no-op with an error message?
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.
I think that this function wasn't used that often and removing it completely shouldn't be that painful for people who would have to migrate to the new API (usually just remove their outdated adapters code, which is no longer needed).
However, if you prefer to leave the createAnimatedPropAdapter
function, then I can restore it as a no-op with the warning message.
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.
This was just a suggestion, we don't have to do that but if it's easy to improve the developer experience then why not
adapters?: | ||
| AnimatedPropsAdapterFunction | ||
| AnimatedPropsAdapterFunction[] | ||
| null, |
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.
Same as for createAnimatedPropAdapter
, what about backwards compatibility?
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.
What do you suggest here? Should I still accept this adapters array but don't use it anywhere at all? It seems to me a bit confusing that a function takes a parameter that is completely ignored.
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.
We can make adapters
parameter @deprecated
and no-op but throw a warning with an actionable developer-friendly error message when it's used.
Summary
This PR removes prop adapters from
useAnimatedStyle
anduseAnimatedProps
. It also removes the no longer neededcreateAnimatedPropAdapter