React Native Runtime lost data/crash when updating referenced assets dynamically
I need to use the React Native Runtime 9.2.0 feature for "updating referenced assets dynamically (without having to reload the whole file)":
https://community.rive.app/c/announcements/react-native-and-early-access-updates
https://github.com/rive-app/rive-react-native/releases/tag/v9.2.0
This is for implementing avatar image replacement and swapping texture images to change character outfits or skin.
However, I’ve encountered some issues.
I created a minimal reproducible project here:
https://github.com/CacaoRick/rive-click-issue/tree/reference-assets
(see App.tsx)
reproduction steps below:
Dynamically changing referencedAssets causes data binding loss and crash
Launch the app and tap "Toggle Member" so the crown badge appears next to the avatar.
Tap "Switch Avatar Asset", you’ll see the avatar changes but the crown disappears.
Tap "Toggle Member" again, and the app crashes.
Sometimes changing referencedAssets also causes a crash
Launch the app and tap "Switch Avatar Asset", you’ll see the avatar changes.
Tap "Switch Avatar Asset" few more times, the app might crash.
## Enviroment
simulator: iOS 18.5
rive runtime: 9.3.4, 9.4.0
npx expo-env-info:
```
System:
OS: macOS 15.4.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.18.0 - /usr/local/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.3 - /usr/local/bin/npm
Watchman: 2025.05.26.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.16.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 24.5, iOS 18.5, macOS 15.5, tvOS 18.5, visionOS 2.5, watchOS 11.5
IDEs:
Android Studio: 2024.3 AI-243.24978.46.2431.13208083
Xcode: 16.4/16F6 - /usr/bin/xcodebuild
npmPackages:
expo: ~53.0.12 => 53.0.13
react: 19.0.0 => 19.0.0
react-native: 0.79.4 => 0.79.4
npmGlobalPackages:
eas-cli: 16.9.0
expo-cli: 6.3.12
Expo Workflow: bare
```