feat(rive): stateChange event for state machine transitions#18
feat(rive): stateChange event for state machine transitions#18stasdav wants to merge 1 commit intoNativeScript:mainfrom
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Stas.
|
|
I can't fully test this patch in a real app because npm doesn't support installing a single package from a monorepo subfolder via a GitHub URL. So I can't use my app's The only way is to build and pack the package locally, or ask a maintainer to publish a prerelease. If there’s a better workflow for app-level testing with monorepo packages, please let me know! |
|
This is excellent @stasdav 💯 - Build/pack is a good way to confirm in a monorepo. |
|
@NathanWalker Thank you for the instructions! |
Title
Add
stateChangeevent for RiveView (iOS + Android)Summary
Exposes State Machine transitions from the native Rive runtimes to JS.
Works the same on both platforms.
Changes
common.ts– adds missingstateChangedEventconstant.RiveStateMachineDelegateImpl– callsowner.notify({ eventName: 'stateChange', ... }).index.d.ts– declareson('stateChange', ...)for type safety.Why
Apps need to react when a Rive State Machine enters a new state (e.g. to chain logic or UI).
Until now this info was only available inside native code.
No breaking changes; existing code keeps working.