This file contains hidden or 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 { | |
Canvas, | |
LinearGradient, | |
Path, | |
useDerivedValue, | |
useValue, | |
vec, | |
Skia, | |
SkPath, | |
runTiming, |
This file contains hidden or 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
# First set the path to sentry.properties | |
export SENTRY_PROPERTIES=sentry.properties | |
# Setup nvm and set node | |
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm" | |
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then | |
. "$HOME/.nvm/nvm.sh" | |
elif [[ -x "$(command -v brew)" && -s "$(brew --prefix nvm)/nvm.sh" ]]; then | |
. "$(brew --prefix nvm)/nvm.sh" |
This file contains hidden or 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 React from 'react'; | |
import Animated, { | |
useAnimatedGestureHandler, | |
useSharedValue, | |
useAnimatedStyle, | |
useDerivedValue, | |
} from 'react-native-reanimated'; | |
import { View, Dimensions } from 'react-native'; | |
import { PanGestureHandler } from 'react-native-gesture-handler'; |
This file contains hidden or 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 Animated, { | |
useSharedValue, | |
withTiming, | |
useAnimatedStyle, | |
Easing, | |
makeRemote, | |
withSpring, | |
processColor, | |
useValue, | |
delay as RDelay, |
This file contains hidden or 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
class Task { | |
constructor({ id, thunk }) { | |
this.id = id; | |
this.thunk = thunk; | |
this._done = false; | |
} | |
setDone() { | |
this._done = true; | |
} |
This file contains hidden or 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 React, { useRef } from 'react'; | |
import { StyleSheet, View, Text } from 'react-native'; | |
import Animated, { | |
useEventWorklet, | |
useSharedValue, | |
} from 'react-native-reanimated'; | |
import { | |
PinchGestureHandler, | |
} from 'react-native-gesture-handler'; |
This file contains hidden or 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 React from 'react'; | |
import { Text, View, Dimensions } from 'react-native'; | |
import Animated, { | |
useSharedValue, | |
useWorklet, | |
useEventWorklet, | |
} from 'react-native-reanimated'; | |
import { PanGestureHandler } from 'react-native-gesture-handler'; | |
import { getStatusBarHeight } from 'react-native-status-bar-height'; |
This file contains hidden or 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 T from 'prop-types'; | |
/* eslint-disable no-extra-boolean-cast */ | |
const existsCheck = (value) => | |
typeof value !== 'undefined' && value !== null; | |
export default function Ternary({ | |
children, | |
exp, | |
exists, |
This file contains hidden or 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
export default function useAnimatedValue( | |
value: number, | |
listener?: boolean | ((arg: any) => any), | |
debugLabel?: string, | |
) { | |
const lastValue = useRef(null); | |
const animatedValue = useMemo(() => new Animated.Value(value), []); | |
useEffect(() => { |
This file contains hidden or 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
function useStyles(styles) { | |
const [, forceUpdate] = useState(); | |
const [width, height] = useDimensions(); | |
useEffect(() => { | |
// TODO: debounce it | |
forceUpdate((v) => v + 1); | |
}, [width, height]); |