'React-native-reanimated not working in web

Currently i`m copied example from this post https://github.com/software-mansion/react-native-reanimated/issues/537 When trying in web Reanimated not working and RN Animated working well.

There is no errors or warnings. Just animation not starting. Versions:

"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.2.tar.gz",
"react-native-web": "~0.13.12",
"react-native-reanimated": "~1.13.0",
"expo": "~39.0.2",

Maybe someone know how to solve this issue?



Solution 1:[1]

As mentioned in comments by @Cris69, react-native-reanimated will not work in web because there is no bridge for web. There are two ways of working with it i found:

  1. Use react-native Animated for web to test and swap it for reanimated later on
  2. Test everything with device or virtual device or don't use reanimated at all

Solution 2:[2]

At the time of the question asked there was no support for Reanimated on web but in version 2+ of Reanimated, web is supported.

reference link - https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/web-support

Following the documentation from the link provided above, I was able to use Reanimated in web.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rankery
Solution 2 Chindukuri Pavan