-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
useAnimatedProps not updating on web #6202
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
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
@gihub-actions i have provided the link to the snack above here it is again : better version: https://snack.expo.dev/@oxbits/slider-%7C-react-native-reanimated |
+1, we're facing the same issue |
Here is a better version of the snack that reproduces the issue: https://snack.expo.dev/@oxbits/slider-%7C-react-native-reanimated |
@oxbits just add |
@andreshsingh check my answer |
Ive added the placeholder to the animated props and still not able to recreate the demo's behavior, still not working on web. See the snack here |
Hello @idrisssakhi and @nemgreene and @andreshsingh idrisssakhi's suggestion is not working: look at nemgreene's snack the thing i do not understand: this example is working on Software Mansion's website in at least two locations: https://docs.swmansion.com/react-native-reanimated/examples/slider/ so what is the difference between these working examples and the example code provided we are using in the snack ?!?! like you would think the code being used by the website would be the same or not ? |
hi @oxbits, it is working in examples in documentation because our documentation uses |
## 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 <[email protected]>
## 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 <[email protected]>
## 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 <[email protected]>
@patrycjakalinska thank you very much 🌈😸 and @5ZYSZ3K too !! |
Description
when i go to here :
https://docs.swmansion.com/react-native-reanimated/examples/slider
the TextInput updates as you slide the slider
when i run the snack web client the TextInput does not update
[same issue when i run the code locally in my workspace on the web]
Steps to reproduce
go to this snack and run on web, the TextInput does not update :
https://snack.expo.io/?platform=android&name=Slider%20%7C%20React%20Native%20Reanimated&dependencies=react-native-reanimated%40*%2Creact-native-gesture-handler%40*%2C%40shopify%2Fflash-list%40*&hideQueryParams=true&sourceUrl=https%3A%2F%2Fdocs.swmansion.com%2Freact-native-reanimated%2Fexamples%2FSlider.js(better snack version:)
https://snack.expo.dev/@oxbits/slider-%7C-react-native-reanimated
Snack or a link to a repository
https://snack.expo.io/?platform=android&name=Slider%20%7C%20React%20Native%20Reanimated&dependencies=react-native-reanimated%40*%2Creact-native-gesture-handler%40*%2C%40shopify%2Fflash-list%40*&hideQueryParams=true&sourceUrl=https%3A%2F%2Fdocs.swmansion.com%2Freact-native-reanimated%2Fexamples%2FSlider.js(better snack version:)
https://snack.expo.dev/@oxbits/slider-%7C-react-native-reanimated
Reanimated version
3.10.1 or 3.12.1 [i tried both and others too]
React Native version
0.74
Platforms
Web
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
all of this makes me wonder why it works on the documentation web page but not in the snack or on my local box ?
The text was updated successfully, but these errors were encountered: