feat: Reanimated shared value → Rive property binding#64
Merged
Conversation
HayesGordon
reviewed
Dec 4, 2025
Demonstrates driving Rive ViewModelNumberProperty from Reanimated shared values using NitroModules.box() to share HybridObjects with worklets.
e8715a1 to
b26295e
Compare
c179481 to
270562d
Compare
This was referenced Dec 8, 2025
HayesGordon
approved these changes
Dec 8, 2025
mfazekas
added a commit
that referenced
this pull request
Dec 9, 2025
* fix: regenerate nitrogen files for nitro-modules 0.31.10 PR #40 was merged with nitrogen files generated by nitro-modules@0.31.8. PR #64 upgraded to nitro-modules@0.31.10 but was developed before PR #40 merged, so it didn't regenerate ViewModelImageProperty. The new nitro-modules version requires JNICallable.hpp include. * fix(android): fix HybridViewModelImageProperty addListener type mismatch The listeners property is MutableList<(Unit) -> Unit> but onChanged is () -> Unit. Wrap in lambda to match the expected signature, same pattern as TriggerProperty. * fix(android): fix updateAsset call signature after PR #63 refactor PR #63 changed updateAsset from 3 args to 2 args (removed context) in ReferencedAssetLoader but missed updating the call site in HybridRiveFile. * fix(ci): force turbo rebuild on stale cache fallback match
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
playIfNeeded()to make sure rive graphics is not in steady state after updateNitroModules.box()to shareViewModelNumberPropertywith workletsHow it works
Test plan
In slow motion there is up to 1 frame difference: