Skip to content

Commit

Permalink
Merge pull request #5955 from parasharrajat/sync-icon
Browse files Browse the repository at this point in the history
fix: spinner on web
  • Loading branch information
tgolen authored Oct 25, 2021
2 parents d39fbf8 + 3edf267 commit fad1d29
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libs/useNativeDriver/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default false;
1 change: 1 addition & 0 deletions src/libs/useNativeDriver/index.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default true;
5 changes: 4 additions & 1 deletion src/styles/animation/SpinningIndicatorAnimation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {Animated, Easing} from 'react-native';
import useNativeDriver from '../../libs/useNativeDriver';

class SpinningIndicatorAnimation {
constructor() {
Expand All @@ -23,7 +24,9 @@ class SpinningIndicatorAnimation {
duration: 2000,
easing: Easing.linear,
isInteraction: false,
useNativeDriver: true,

// Animated.loop does not work with `useNativeDriver: true` on Web
useNativeDriver,
}),
).start();
}
Expand Down

0 comments on commit fad1d29

Please sign in to comment.