Q&A
13강 AnimatedTabBarButton type 질문
2026년 2월 26일 기준으로 PlatformPressable 을 사용하면 되네요 애니메이션 기반의 Pressable 컴포넌트라고 합니다. import { Ionicons } from "@expo/vector-icons"; import { type BottomTabBarButtonProps } from "@react-navigation/bottom-tabs"; import { PlatformPressable } from "@react-navigation/elements"; import { Tabs, useRouter } from "expo-router"; import { useRef, useState } from "react"; import { Animated, Modal, Text, TouchableOpacity, View, } from "react-native"; const AnimatedTabBarButton = ({ children, onPress, style, ...restProps }: BottomTabBarButtonProps) => { const scaleValue = useRef(new Animated.Value(1)).current; const handlePressOut = () => { Animated.sequence([ Animated.spring(scaleValue, { toValue: 1.2, useNativeDriver: true, speed: 200, }), Animated.spring(scaleValue, { toValue: 1, useNativeDriver: true, speed: 200, }), ]).start(); }; // const { ref, ...pressableProps } = restProps; return ( {children} ); };
- Likes
- 5
- Comments
- 5
- Viewcount
- 253

