-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 text not working on web #6691
Conversation
Hi @5ZYSZ3K, thanks for creating this pull request c: Can you split it so one PR would have only one responsibility? Currently we have 2 fixes and one feature, ideally each one of these would be separate. About |
Hello @5ZYSZ3K and @patrycjakalinska We see our issue has been referenced in this pull request. We see another pull request has been referenced but we do not think it fixes the issue we are experiencing.
|
Hi, I've rebased it and got rid of an additional example - now it's just the fix + a showcase on already existing examples (which were affected by the bug) |
If you meant that my fix is not working in your case, could you try it again, but with the
|
A quick explanation on why it wasn't working: |
hi @5ZYSZ3K, thanks for finding the underlying issue in RN |
## 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](#6691). ## Test plan Run **JS props** or **Amount** in `web-example` --------- Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
## 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](#6691). ## Test plan Run **JS props** or **Amount** in `web-example` --------- Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
## 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](#6691). ## Test plan Run **JS props** or **Amount** in `web-example` --------- Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
fix: web-example not starting because of metro-resolver version mismatch
feature: Add AnimatedPathExample to the repo
Summary
Test plan
You can check example app. Examples: