Skip to content

Conversation

MatiPl01
Copy link
Member

Summary

This PR removes prop adapters from useAnimatedStyle and useAnimatedProps. It also removes the no longer needed createAnimatedPropAdapter

@MatiPl01 MatiPl01 self-assigned this Aug 12, 2025
@MatiPl01 MatiPl01 marked this pull request as ready for review August 12, 2025 06:51
@MatiPl01 MatiPl01 requested a review from tomekzaw August 12, 2025 07:19
nativeProps?: string[]
): AnimatedPropsAdapterFunction;

export function createAnimatedPropAdapter(
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

Comment on lines -12 to -15
adapters?:
| AnimatedPropsAdapterFunction
| AnimatedPropsAdapterFunction[]
| null,
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants