Skip to content

Instantly share code, notes, and snippets.

@jai-adapptor
Last active July 25, 2022 13:53
Show Gist options
  • Save jai-adapptor/7dc26e27f5b901e0a5ec86eba4d6d220 to your computer and use it in GitHub Desktop.
Save jai-adapptor/7dc26e27f5b901e0a5ec86eba4d6d220 to your computer and use it in GitHub Desktop.
3: Animated values
// Animated values
const position = useSharedValue<SheetPositions>('minimised');
const sheetHeight = useSharedValue(-minHeight);
const navHeight = useSharedValue(0);
const springConfig: WithSpringConfig = {
damping: 50,
mass: 0.3,
stiffness: 120,
overshootClamping: true,
restSpeedThreshold: 0.3,
restDisplacementThreshold: 0.3,
};
const DRAG_BUFFER = 40;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment