diff --git a/example/assets/rive/rewards_source.riv b/example/assets/rive/rewards.riv similarity index 100% rename from example/assets/rive/rewards_source.riv rename to example/assets/rive/rewards.riv diff --git a/example/src/pages/OutOfBandAssets.tsx b/example/src/pages/OutOfBandAssets.tsx index f6860c30..151dfc7d 100644 --- a/example/src/pages/OutOfBandAssets.tsx +++ b/example/src/pages/OutOfBandAssets.tsx @@ -1,7 +1,6 @@ import * as React from 'react'; import { ActivityIndicator, - SafeAreaView, ScrollView, StyleSheet, Text, @@ -52,14 +51,14 @@ export default function StateMachine() { return ; } else if (error != null) { return ( - + Error loading Rive file - + ); } return ( - + - + ); } diff --git a/example/src/pages/RiveDataBindingExample.tsx b/example/src/pages/RiveDataBindingExample.tsx index b72b66c6..eae05891 100644 --- a/example/src/pages/RiveDataBindingExample.tsx +++ b/example/src/pages/RiveDataBindingExample.tsx @@ -15,7 +15,7 @@ import { type Metadata } from '../helpers/metadata'; export default function WithRiveFile() { const { riveFile, isLoading, error } = useRiveFile( - require('../../assets/rive/rewards_source.riv') + require('../../assets/rive/rewards.riv') ); return ( diff --git a/expo-example/app.config.js b/expo-example/app.config.js new file mode 100644 index 00000000..d4bd7bae --- /dev/null +++ b/expo-example/app.config.js @@ -0,0 +1,56 @@ +module.exports = { + expo: { + name: 'expo-example', + slug: 'expo-example', + version: '1.0.0', + orientation: 'portrait', + icon: './assets/images/icon.png', + scheme: 'expoexample', + userInterfaceStyle: 'automatic', + newArchEnabled: true, + ios: { + supportsTablet: true, + bundleIdentifier: 'com.rive.expo-example', + }, + android: { + adaptiveIcon: { + backgroundColor: '#E6F4FE', + foregroundImage: './assets/images/android-icon-foreground.png', + backgroundImage: './assets/images/android-icon-background.png', + monochromeImage: './assets/images/android-icon-monochrome.png', + }, + edgeToEdgeEnabled: true, + predictiveBackGestureEnabled: false, + package: 'com.rive.expoexample', + }, + web: { + output: 'static', + favicon: './assets/images/favicon.png', + }, + plugins: [ + 'expo-router', + [ + 'expo-splash-screen', + { + image: './assets/images/splash-icon.png', + imageWidth: 200, + resizeMode: 'contain', + backgroundColor: '#ffffff', + dark: { + backgroundColor: '#000000', + }, + }, + ], + [ + 'expo-asset', + { + assets: ['../example/assets/rive/rewards.riv'], + }, + ], + ], + experiments: { + typedRoutes: true, + reactCompiler: true, + }, + }, +}; diff --git a/src/hooks/useRiveFile.ts b/src/hooks/useRiveFile.ts index f596509f..2d4299de 100644 --- a/src/hooks/useRiveFile.ts +++ b/src/hooks/useRiveFile.ts @@ -85,7 +85,6 @@ export function useRiveFile( [options.referencedAssets] ); const initialReferencedAssets = useRef(referencedAssets); - const initialInput = useRef(input); useEffect(() => { let currentFile: RiveFile | null = null; @@ -162,12 +161,6 @@ export function useRiveFile( } }, [referencedAssets, riveFile]); - if (initialInput.current !== input) { - console.warn( - 'useRiveFile: Changing input after initial render is not supported.' - ); - } - return { riveFile: result.riveFile, isLoading: result.isLoading,