n4kz / react-native-indicators

Activity indicator collection for React Native
Other
912 stars 118 forks source link

Make loops work on web #35

Open sertony opened 3 years ago

sertony commented 3 years ago

Currently react-native-indicator doesn't work with react-native-web due to the fact that _startNativeLoop implementation on web is not working due to the missing NativeAnimatedModule for web: https://github.com/necolas/react-native-web/blob/a877a02beb6a2032430f83b062e173d68c40c65d/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js#L266

That's why the only way to make it work on web is to turn off the native driver and switch to recursive calls on JS thread: https://github.com/necolas/react-native-web/blob/a877a02beb6a2032430f83b062e173d68c40c65d/packages/react-native-web/src/vendor/react-native/Animated/AnimatedImplementation.js#L452

jamesqm commented 3 years ago

hi @n4kz , can you please check this PR?

sreuter commented 3 years ago

@n4kz Could you merge this and/or give somebody else access to help review and pull requests by any chance?

Jackman3005 commented 2 years ago

Hey, can we move this forward? The solution seems good, what's the hold up?