Skip to content

Commit 3dfa787

Browse files
committed
Revert empty example
1 parent 8a3f591 commit 3dfa787

File tree

1 file changed

+1
-43
lines changed

1 file changed

+1
-43
lines changed

apps/common-app/src/apps/reanimated/examples/EmptyExample.tsx

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,15 @@
1-
import React, { useEffect } from 'react';
1+
import React from 'react';
22
import { StyleSheet, Text, View } from 'react-native';
3-
import Animated, {
4-
interpolateColor,
5-
useAnimatedStyle,
6-
useSharedValue,
7-
withRepeat,
8-
withTiming,
9-
} from 'react-native-reanimated';
103

114
export default function EmptyExample() {
12-
const sv = useSharedValue(0);
13-
14-
const eStyle = useAnimatedStyle(() => ({
15-
backgroundColor: interpolateColor(
16-
sv.value,
17-
[0, 1],
18-
['yellow', 'transparent']
19-
),
20-
}));
21-
22-
useEffect(() => {
23-
sv.value = 0;
24-
sv.value = withRepeat(withTiming(1, { duration: 3000 }), -1, true);
25-
}, [sv]);
26-
275
return (
286
<View style={styles.container}>
297
<Text>Hello world!</Text>
30-
<Animated.View
31-
style={[
32-
styles.box,
33-
eStyle,
34-
// {
35-
// animationName: {
36-
// from: { backgroundColor: 'yellow' },
37-
// to: { backgroundColor: 'transparent' },
38-
// },
39-
// animationDuration: '3000ms',
40-
// animationIterationCount: 'infinite',
41-
// animationDirection: 'alternate',
42-
// },
43-
]}
44-
/>
458
</View>
469
);
4710
}
4811

4912
const styles = StyleSheet.create({
50-
box: {
51-
width: 100,
52-
height: 100,
53-
backgroundColor: 'red',
54-
},
5513
container: {
5614
flex: 1,
5715
alignItems: 'center',

0 commit comments

Comments
 (0)