Communitygithub.com

ComeOnOliver/skillshub

Reanimated은 네이티브 UI 스레드에서 애니메이션을 실행하여 JS 브리지 병목 현상과 프레임 드롭을 방지합니다. JavaScript 스레드가 바쁠 때도 애니메이션이 60fps를 유지합니다. 제스처 기반 상호작용, 레이아웃 전환, 스크롤 기반 효과, 공유 요소 전환 등 프로덕션 품질의 React Native 애니메이션을 위한 표준입니다.

skillshub란 무엇인가요?

Reanimated은 네이티브 UI 스레드에서 애니메이션을 실행하는 React Native 라이브러리입니다. JS 브리지를 거치지 않고 JSI(JavaScript Interface)를 통해 UI 스레드에서 직접 실행되는 '워클릿(worklet)'이라는 작은 JavaScript 함수를 사용하여, JavaScript 스레드가 무거운 작업을 수행 중이더라도 애니메이션이 60fps로 매끄럽게 유지되도록 합니다. 이 스킬은 물리 기반의 withSpring, 시간 기반의 withTiming, 제스처 처리기 통합, 레이아웃 및 스크롤 기반 애니메이션 등 다양한 애니메이션 패턴을 코드 예제와 함께 설명합니다. Expo 및 React Native CLI 환경에서 사용 가능하며, 설정 시 Babel 플러그인이 항상 마지막에 위치해야 합니다. 프로덕션 수준의 React Native 앱에서 UI 상호작용을 부드럽고 반응성 있게 만들어야 할 때 필수적인 도구입니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/TerminalSkills/skills/react-native-reanimated

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

React Native Reanimated

개요

Reanimated은 네이티브 UI 스레드에서 애니메이션을 실행합니다. JS 브리지 병목 현상, 프레임 드롭이 없습니다. JavaScript 스레드가 바쁠 때도 애니메이션이 60fps를 유지합니다. JSI를 통해 UI 스레드에서 실행되는 작은 JavaScript 함수인 "워클릿(worklet)"을 사용합니다. 제스처 기반 상호작용, 레이아웃 전환, 스크롤 기반 효과, 공유 요소 전환 등 프로덕션 품질의 React Native 애니메이션을 위한 표준입니다.

사용 시기

  • 단순한 opacity/transform을 넘어서는 모든 React Native 애니메이션
  • 제스처 기반 상호작용 (스와이프하여 삭제, 드래그하여 재정렬, 핀치하여 확대/축소)
  • 스크롤 기반 애니메이션 (패럴랙스 헤더, 고정 요소)
  • 레이아웃 애니메이션 (항목이 리스트에 추가되거나 제거될 때)
  • 화면 간 공유 요소 전환

지침

설정

npx expo install react-native-reanimated react-native-gesture-handler
// babel.config.js — Reanimated 플러그인 추가 (반드시 마지막에 위치)
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["babel-preset-expo"],
    plugins: ["react-native-reanimated/plugin"],  // 반드시 마지막!
  };
};

공유 값과 애니메이션 스타일

// components/FadeIn.tsx — 공유 값을 사용한 기본 애니메이션
import Animated, {
  useSharedValue,
  useAnimatedStyle,
  withTiming,
  withSpring,
} from "react-native-reanimated";
import { useEffect } from "react";

export function FadeInCard({ children }) {
  const opacity = useSharedValue(0);
  const translateY = useSharedValue(20);

  useEffect(() => {
    opacity.value = withTiming(1, { duration: 600 });
    translateY.value = withSpring(0, { damping: 15 });
  }, []);

  const animatedStyle = useAnimatedStyle(() => ({
    opacity: opacity.value,
    transform: [{ translateY: translateY.value }],
  }));

  return (
    <Animated.View style={animatedStyle} className="bg-white rounded-xl p-4 shadow-lg">
      {children}
    </Animated.View>
  );
}

제스처 애니메이션

// components/SwipeToDelete.tsx — 애니메이션이 포함된 스와이프 제스처
import Animated, {
  useSharedValue,
  useAnimatedStyle,
  withSpring,
  runOnJS,
} from "react-native-reanimated";
import { Gesture, GestureDetector } from "react-native-gesture-handler";

export function SwipeToDelete({ onDelete, children }) {
  const translateX = useSharedValue(0);

  const pan = Gesture.Pan()
    .onUpdate((event) => {
      // 왼쪽 스와이프만 허용
      translateX.value = Math.min(0, event.translationX);
    })
    .onEnd((event) => {
      if (event.translationX < -150) {
        // 충분히 스와이프됨 — 삭제
        translateX.value = withSpring(-400);
        runOnJS(onDelete)();
      } else {
        // 원래 위치로 돌아감
        translateX.value = withSpring(0);
      }
    });

  const animatedStyle = useAnimatedStyle(() => ({
    transform: [{ translateX: translateX.value }],
  }));

  return (
    <GestureDetector gesture={pan}>
      <Animated.View style={animatedStyle}>
        {children}
      </Animated.View>
    </GestureDetector>
  );
}

레이아웃 애니메이션

// components/AnimatedList.tsx — 항목이 자동으로 나타나고 사라짐
import Animated, { FadeInDown, FadeOutLeft, LinearTransition } from "react-native-reanimated";

export function AnimatedList({ items, onRemove }) {
  return (
    <Animated.FlatList
      data={items}
      itemLayoutAnimation={LinearTransition}
      renderItem={({ item, index }) => (
        <Animated.View
          entering={FadeInDown.delay(index * 100).springify()}
          exiting={FadeOutLeft.duration(300)}
          className="bg-white p-4 mx-4 my-1 rounded-lg"
        >
          <Text>{item.title}</Text>
          <Pressable onPress={() => onRemove(item.id)}>
            <Text className="text-red-500">제거</Text>
          </Pressable>
        </Animated.View>
      )}
    />
  );
}

스크롤 기반 애니메이션

// components/ParallaxHeader.tsx — 스크롤에 따른 패럴랙스 효과
import Animated, {
  useAnimatedScrollHandler,
  useSharedValue,
  useAnimatedStyle,
  interpolate,
} from "react-native-reanimated";

export function ParallaxHeader() {
  const scrollY = useSharedValue(0);

  const scrollHandler = useAnimatedScrollHandler({
    onScroll: (event) => {
      scrollY.value = event.contentOffset.y;
    },
  });

  const headerStyle = useAnimatedStyle(() => ({
    height: interpolate(scrollY.value, [-100, 0, 200], [400, 300, 100]),
    opacity: interpolate(scrollY.value, [0, 200], [1, 0.3]),
    transform: [
      { translateY: interpolate(scrollY.value, [0, 200], [0, -50]) },
    ],
  }));

  return (
    <>
      <Animated.View style={headerStyle} className="bg-blue-600">
        <Text className="text-white text-3xl font-bold">내 앱</Text>
      </Animated.View>
      <Animated.ScrollView onScroll={scrollHandler} scrollEventThrottle={16}>
        {/* 내용 */}
      </Animated.ScrollView>
    </>
  );
}

예제

예제 1: 카드 스와이프 인터페이스 구축

사용자 프롬프트: "부드러운 애니메이션이 포함된 Tinder 스타일의 카드 스와이프 인터페이스를 구축해줘."

에이전트는 팬 제스처, 스와이프 방향에 따른 회전, 스냅백을 위한 스프링 애니메이션, 카드 제거를 위한 레이아웃 전환을 사용하여 카드 스택을 생성합니다.

예제 2: 애니메이션 바텀 시트

사용자 프롬프트: "위로 드래그하여 특정 위치에 스냅되는 바텀 시트를 만들어줘."

에이전트는 스냅 포인트가 있는 팬 제스처, 높이를 위한 공유 값, 부드러운 스냅을 위한 스프링 애니메이션을 사용합니다.

가이드라인

  • 애니메이션 상태를 위한 공유 값 — useSharedValue는 UI 스레드에서 실행됩니다.
  • 동적 스타일을 위한 useAnimatedStyle — UI 스레드에서 재계산됩니다.
  • 자연스러운 움직임을 위한 withSpring — 정밀한 지속 시간이 필요할 때는 withTiming을 사용합니다.
  • 워클릿에서 JS 호출을 위한 runOnJS — 필요할 때 JS 스레드로 돌아갑니다.
  • 제스처 핸들러 통합 — Gesture.Pan(), Gesture.Pinch() 등
  • 레이아웃 애니메이션은 선언적 — Animated 컴포넌트의 entering, exiting 속성
  • 값 매핑을 위한 interpolate — 스크롤 위치를 opacity, scale 등에 매핑합니다.
  • Babel 플러그인은 반드시 마지막 — react-native-reanimated/plugin은 plugins 배열의 끝에 위치해야 합니다.
  • 워클릿에서 JS 객체에 접근하지 마세요 — 공유 값과 원시 타입만 사용 가능합니다.
  • scrollEventThrottle={16} — 부드러운 애니메이션을 위한 60fps 스크롤 이벤트

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬