Skip to content

Conversation

@mfazekas
Copy link
Collaborator

Summary

  • useRiveProperty (and all hooks using it like useRiveEnum, useRiveNumber, etc.) returned undefined on initial render even when the property had a value
  • Fixed by retrieving the property first, then initializing state with its current value

Test plan

  • Added unit tests for initial value, path changes, and instance changes
  • All tests pass

The hook initialized useState with undefined and only updated via listener callbacks which fire on changes, not on initial attachment. Now the property is retrieved first and its value is used to initialize state.
@mfazekas mfazekas marked this pull request as ready for review December 23, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants