Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FlatList type #3029

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Fix FlatList type #3029

merged 2 commits into from
Sep 17, 2024

Conversation

j-piasecki
Copy link
Member

Description

Closes #2990

Removes renderScrollComponent from the public API of FlatList exported by Gesture Handler, as its being overwritten with Gesture Handler's scroll view anyway.

Test plan

Verify that renderScrollComponent causes a TypeScript error on FlatList exported from RNGH.

Copy link
Contributor

@m-bert m-bert left a comment

Choose a reason for hiding this comment

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

I think it would be better to use Omit:

props: PropsWithChildren<
    Omit<RNFlatListProps<ItemT>, 'renderScrollComponent'> &
      RefAttributes<FlatList<ItemT>> &
      NativeViewGestureHandlerProps

This way renderScrollComponent is truly removed from public API 😅

Copy link
Contributor

@m-bert m-bert left a comment

Choose a reason for hiding this comment

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

🚀

@j-piasecki j-piasecki merged commit af9b77c into main Sep 17, 2024
1 check passed
@j-piasecki j-piasecki deleted the @jpiasecki/fix-flatlist-type branch September 17, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants