Skip to content

Conversation

@ammarahm-ed
Copy link
Owner

No description provided.

@vercel
Copy link

vercel bot commented Nov 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rnas Ready Ready Preview Comment Nov 5, 2025 0:23am

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 migrates the react-native-actions-sheet library from React Native's Animated API to react-native-reanimated v3. The migration includes major refactoring of animation logic, gesture handling, and scroll handlers, along with infrastructure updates for examples and configuration.

  • Migration from Animated API to react-native-reanimated v3 for improved performance
  • Complete rewrite of gesture handling using react-native-reanimated's Gesture API
  • Removal of FlashList support from the main library
  • Addition of react-native-reanimated as a peer dependency

Reviewed Changes

Copilot reviewed 29 out of 35 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/index.tsx Complete migration to reanimated, replacing Animated API with useSharedValue and reanimated gesture system
src/types.ts Updated animation config types to use SpringConfig from reanimated, added initialTranslateFactor prop
src/hooks/use-scroll-handlers.ts Refactored to return individual props instead of memoized object, optimized dependency arrays
src/hooks/use-router.ts Migrated route animations from Animated to reanimated's withTiming
src/views/ScrollView.tsx Updated to work with new gesture handler system, simplified props spreading
src/views/FlatList.tsx Similar updates to ScrollView, removed Platform conditionals
src/views/FlashList.tsx File deleted - FlashList support removed from library
package.json Added react-native-reanimated as peer dependency, updated version to 10.0.0-alpha.3
tsconfig.json Removed FlashList from includes, added incremental: false
Files not reviewed (2)
  • example/ios/example.xcworkspace/contents.xcworkspacedata: Language not supported
  • example/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

src/index.tsx:1

  • Using any type on line 17 in FlatList.tsx defeats TypeScript's type safety. The generic should be properly typed or use a more specific constraint.
/* eslint-disable curly */

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

src/index.tsx Outdated
if (closable) {
closing.current = true;
Keyboard.dismiss();
// translateY.removeListener(245);
Copy link

Copilot AI Nov 1, 2025

Choose a reason for hiding this comment

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

Commented-out code on line 416 should be removed. If this functionality is no longer needed, the comment serves no purpose; if it's for future reference, it should be documented properly or tracked in an issue.

Suggested change
// translateY.removeListener(245);

Copilot uses AI. Check for mistakes.
(vy: number) => {
if (currentSnapIndex.current === 0) {
if (closable) {
initialValue.current = dimensionsRef.current.height * 1.3;
Copy link

Copilot AI Nov 1, 2025

Choose a reason for hiding this comment

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

Using setTimeout with no delay (implicitly 0ms) on line 527 is a code smell. If the intent is to defer execution to the next tick, this should be documented with a comment explaining why the deferral is necessary.

Suggested change
initialValue.current = dimensionsRef.current.height * 1.3;
initialValue.current = dimensionsRef.current.height * 1.3;
// Defer hideSheet to the next tick to ensure UI updates and avoid potential race conditions.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
package.json Outdated
{
"name": "react-native-actions-sheet",
"version": "0.9.8",
"version": "10.0.0-alpha.3",
Copy link

Choose a reason for hiding this comment

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

Did you mean 0.10.0-alpha.3 ? Is quite the jump from a "zero" version to version 10 semantically

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.

3 participants