### Start Metro Server for Example App Source: https://github.com/margelo/react-native-skottie/blob/main/CONTRIBUTING.md Use this command to start the Metro bundler for the example application. Changes to JavaScript code will be reflected without a rebuild. ```sh yarn example start ``` -------------------------------- ### iOS Project Setup Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/QUICK_REFERENCE.md Navigate to the `ios` directory, install CocoaPods dependencies, and then run the iOS application. ```bash cd ios pod install --repo-update cd .. react-native run-ios ``` -------------------------------- ### Enable New Architecture for iOS Example App Source: https://github.com/margelo/react-native-skottie/blob/main/CONTRIBUTING.md Commands to prepare and run the iOS example app with the new architecture enabled. This involves installing pods and then running the app. ```sh RCT_NEW_ARCH_ENABLED=1 yarn example pods yarn example ios ``` -------------------------------- ### Bootstrap Project Dependencies Source: https://github.com/margelo/react-native-skottie/blob/main/CONTRIBUTING.md This script installs all project dependencies and initializes native modules (pods) for the example app. ```sh yarn bootstrap ``` -------------------------------- ### Run Example App on Android Source: https://github.com/margelo/react-native-skottie/blob/main/CONTRIBUTING.md Execute this command to build and run the example application on an Android device or emulator. ```sh yarn example android ``` -------------------------------- ### Run Example App on iOS Source: https://github.com/margelo/react-native-skottie/blob/main/CONTRIBUTING.md Execute this command to build and run the example application on an iOS simulator or device. ```sh yarn example ios ``` -------------------------------- ### Install react-native-skottie Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/00_START_HERE.md Install the library and its peer dependency, @shopify/react-native-skia. Then, run pod install for iOS and build the project. ```bash npm install react-native-skottie @shopify/react-native-skia cd ios && pod install && cd .. react-native run-ios # or run-android ``` -------------------------------- ### Install react-native-skottie and Dependencies Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/QUICK_REFERENCE.md Install the library and its peer dependency, @shopify/react-native-skia. After installation, navigate to the ios directory to install pods and then run the application. ```bash npm install react-native-skottie @shopify/react-native-skia cd ios && pod install && cd .. react-native run-ios # or run-android ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/margelo/react-native-skottie/blob/main/CONTRIBUTING.md Run this command in the package directory to install all required dependencies for the project. ```shell yarn ``` -------------------------------- ### Install iOS CocoaPods Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/configuration.md Install the necessary pods for your iOS project after navigating to the 'ios' directory. ```bash pod install ``` -------------------------------- ### Run Example App on Android with New Architecture Source: https://github.com/margelo/react-native-skottie/blob/main/CONTRIBUTING.md This command enables the new architecture for the Android example app during runtime. Ensure your environment is set up for the new architecture. ```sh ORG_GRADLE_PROJECT_newArchEnabled=true yarn example android ``` -------------------------------- ### Install react-native-skottie using npm Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/platform-support.md Use this command to add the react-native-skottie library to your project with npm. ```bash npm install react-native-skottie ``` -------------------------------- ### Copy Skia Headers for Development Source: https://github.com/margelo/react-native-skottie/blob/main/CONTRIBUTING.md Execute this command to copy the Skia submodule headers into the example directory, which is necessary for development. ```shell yarn dev:module-copy-skia-headers ``` -------------------------------- ### Navigation Map Example Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/00_START_HERE.md This diagram illustrates the recommended reading order and navigation path through the documentation for React Native Skottie. ```markdown START HERE (this file) ↓ QUICK_REFERENCE.md (syntax) ↓ api-reference/skottie-component.md (component) ↓ Choose your path: - Control with refs → api-reference/ref-api.md - Use Reanimated → api-reference/reanimated-integration.md - Load animations → api-reference/source-loading.md - Learn types → types.md - Configure → configuration.md - Setup platform → platform-support.md ``` -------------------------------- ### Install react-native-skottie using yarn Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/platform-support.md Use this command to add the react-native-skottie library to your project with yarn. ```bash yarn add react-native-skottie ``` -------------------------------- ### Install @shopify/react-native-skia dependency Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/platform-support.md Install the Skia dependency if it's not already present in your project. This is required for react-native-skottie to function. ```bash npm install @shopify/react-native-skia ``` -------------------------------- ### Full Skottie Example with Imperative and Reanimated Control Source: https://github.com/margelo/react-native-skottie/blob/main/_autodocs/QUICK_REFERENCE.md A complete example demonstrating how to use Skottie with both imperative controls (play, pause, reset) and Reanimated for animation progress. It includes switching between control methods and displaying animation details. ```typescript import { useRef, useState, useEffect, useMemo } from 'react'; import { View, Button, Text } from 'react-native'; import { Skottie, SkottieAPI, type SkottieViewRef } from 'react-native-skottie'; import { useSharedValue, withTiming, withRepeat, Easing, } from 'react-native-reanimated'; import animationData from './animation.json'; export default function CompleteExample() { const refRef = useRef(null); const [method, setMethod] = useState<'imperative' | 'reanimated'>('imperative'); const progress = useSharedValue(0); const animation = useMemo(() => SkottieAPI.createFrom(animationData), []); useEffect(() => { if (method === 'reanimated') { progress.value = withRepeat( withTiming(1, { duration: animation.duration * 1000, easing: Easing.linear }), -1 ); } }, [method, animation.duration, progress]); return ( {method === 'imperative' ? ( ) : ( )}