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

[TS migration] Migrate 'SectionList' component to TypeScript #29745

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/components/SectionList/index.android.js

This file was deleted.

18 changes: 18 additions & 0 deletions src/components/SectionList/index.android.tsx
BartoszGrajdek marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React, {ForwardedRef, forwardRef} from 'react';
import {SectionListProps, SectionList} from 'react-native';

function SectionListWithoutSubviews(props: SectionListProps<SectionList>, ref: ForwardedRef<SectionList>) {
return (
<SectionList
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
ref={ref}
// For Android we want to use removeClippedSubviews since it helps manage memory consumption. When we
// run out memory images stop loading and appear as grey circles
// eslint-disable-next-line react/jsx-props-no-multi-spaces
removeClippedSubviews
/>
);
}

export default forwardRef(SectionListWithoutSubviews);
Loading