Difficulty binding to a view model #124
leemhenson
started this conversation in
General
Replies: 1 comment 3 replies
-
Sorry this seems to be a bug with the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(I'm cross posting this from the Rive community forum as I suspect there's not too much nitro usage yet)
I’m having trouble getting the new Nitro-based react native library to data bind to my view model. My rive file has multiple artboards, the one I’m rendering for my animation is called: “XP Level up” and it’s bound to a ViewModel called “LevelUpViewModel”:
This view model has a few properties, a trigger, and also a nested view model:
I’m trying to set some initial values for these props but it’s not having any effect. I’m doing this:
When I view my console I can see the log message from
onInitwhich is showing:{"instanceName": "Instance", "name": "ViewModelInstance"}I was expecting the name to be
“LevelUpViewModel”but perhaps I’m misunderstanding what that“name”refers to.Can you give me any pointers about how to correctly access the right view model instance?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions