Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork148
V10#465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
V10#465
Uh oh!
There was an error while loading.Please reload this page.
Conversation
vercelbot commentedNov 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The latest updates on your projects. Learn more aboutVercel for GitHub.
|
There was a problem hiding this 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
anytype 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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/index.tsx Outdated
| if(closable){ | ||
| closing.current=true; | ||
| Keyboard.dismiss(); | ||
| // translateY.removeListener(245); |
CopilotAINov 1, 2025
There was a problem hiding this comment.
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.
| // translateY.removeListener(245); |
Uh oh!
There was an error while loading.Please reload this page.
| (vy:number)=>{ | ||
| if(currentSnapIndex.current===0){ | ||
| if(closable){ | ||
| initialValue.current=dimensionsRef.current.height*1.3; |
CopilotAINov 1, 2025
There was a problem hiding this comment.
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.
| 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. |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
package.json Outdated
| { | ||
| "name":"react-native-actions-sheet", | ||
| "version":"0.9.8", | ||
| "version":"10.0.0-alpha.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Did you mean0.10.0-alpha.3 ? Is quite the jump from a "zero" version to version 10 semantically
No description provided.