Skip to content

Conversation

@lancesnider
Copy link
Contributor

This is the one we'd like to have for all runtimes.

CleanShot.2025-09-23.at.16.42.04.mp4

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive Quick Start example to the React Native example app, demonstrating key Rive functionality including data binding, view model properties, and triggers.

  • Adds a new QuickStart.tsx component showcasing Rive React Native integration patterns
  • Integrates the Quick Start example into the app navigation and home screen
  • Includes the required quick_start.riv asset file in the iOS project configuration

Reviewed Changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 2 comments.

File Description
example/ios/example.xcodeproj/project.pbxproj Adds quick_start.riv asset to iOS project resources and simplifies OTHER_LDFLAGS configuration
example/app/index.tsx Adds Quick Start navigation link to the home screen
example/app/_layout.tsx Registers the Quick Start screen in the navigation stack
example/app/(examples)/QuickStart.tsx Implements the comprehensive Quick Start example component

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +42 to +49
const handleTakeDamage = () => {
if (health && setHealth) {
setHealth(health - 7);
// If all state machines have settled, you might need to wake the state machine back up.
// This can happen when all animations have finished playing.
riveRef?.play();
}
};
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number 7 for damage amount should be extracted to a named constant to improve code readability and maintainability.

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +56
const handleMaxHealth = () => {
if (setHealth) {
setHealth(100);
riveRef?.play();
}
};
Copy link

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number 100 for maximum health should be extracted to a named constant to improve code readability and maintainability.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@HayesGordon HayesGordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lancesnider lancesnider merged commit fb83d70 into main Sep 24, 2025
1 check passed
@lancesnider lancesnider deleted the update-examples-1 branch September 24, 2025 22:43
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