React-native-reanimated not working in web

2.7k views Asked by At

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?

2

There are 2 answers

0
rankery On BEST ANSWER

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
0
Chindukuri Pavan On

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/guides/web-support/

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