Я создаю оболочку вокруг SectionList , которая должна принимать все реквизиты, которые принимает SectionList, плюс мои пользовательские реквизиты. Как мне настроить машинописный текст для этого?
Вот моя попытка:
import React from 'react';
import { SafeAreaView, SectionList } from 'react-native';
interface EnhancedSectionListProps {
...SectionListProps; // this obviously won't compile, but shows what I'm trying to achieve
enhancedProp: string;
}
export const EnhancedSectionList = (props: EnhancedSectionListProps) => {
return (
<SafeAreaView>
<SectionList {...props} />
// use my `enhancedProp` here
</SafeAreaView>
);
};
PS: Мы не используем библиотеку prop-types
.