Skip to content

Commit

Permalink
fix: change initialization from play to load event
Browse files Browse the repository at this point in the history
  • Loading branch information
damzobridge committed Jun 27, 2024
1 parent ca48907 commit df928eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useStateMachineInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function useStateMachineInput(
}
setStateMachineInput();
if (rive) {
rive.on(EventType.Play, () => {
rive.on(EventType.Load, () => {
// Check if the component/canvas is mounted before setting state to avoid setState
// on an unmounted component in some rare cases
setStateMachineInput();
Expand Down

0 comments on commit df928eb

Please sign in to comment.