Skip to content
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

fix: useAnimatedProps on input component not working on web #6964

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

patrycjakalinska
Copy link
Contributor

Summary

Fixes #6202.
Due to React Native's _valueTracker, using useAnimatedProps won't work on input component. Before when using react-native-web <= 18 we were able to set text props using setNativeProps legacy function. Currently on newer react-native-web, (and due to the _valueTracker), we were trying to setAttribute text on input component -unsuccessfully.
This PR implements fix that checks whether current component is input with a prop text, if so it updates props directly on it.

With a support from this PR.

Test plan

Run JS props or Amount in web-example

@patrycjakalinska patrycjakalinska marked this pull request as ready for review January 31, 2025 10:44
Copy link
Member

@tomekzaw tomekzaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! LGTM, but let's wait for @piaskowyk's approval prior to merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useAnimatedProps not updating on web
2 participants