This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StyleSheet, View } from "react-native"; | |
import React, { useEffect, useState } from "react"; | |
import Animated, { | |
useAnimatedRef, | |
useAnimatedStyle, | |
useSharedValue, | |
withRepeat, | |
withTiming, | |
} from "react-native-reanimated"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
у нас: | |
<View style={ДЕНЬ}> | |
<TouchableOpacity БЕЗ СТИЛЯ> | |
<View style={ЧИСЛО}/> | |
<View style={ИНДИКАТОР}/> | |
</TouchableOpacity> | |
</View> | |
в библиотечке: | |
<TouchableOpacity без стиля> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
для мобилок: | |
{ | |
'22.09.2017': [ | |
{ hour: 8, price: 200 }, | |
{ hour: 9, price: 300 }, | |
{ hour: 10, price: 400 }, | |
... | |
{ hour: 23, price: 500 } | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Define a state variable for showing/hiding the action-button | |
state = { | |
shouldShow: false, | |
} | |
// 2. Define a variable that will keep track of the current scroll position | |
_scrollOffset = 0 | |
// 3. Add an onScroll listener to your listview/scrollview | |
<ScrollView |