이제 이 컴포넌트를 ArticleScreen에서 사용하세요.
screens/ArticleScreen.tsx
(import CommentItem from '../components/CommentItem'; type ArticleScreenRouteProp RouteProp<RootStackParamList, 'Article'>; function () { ( ) return ( <FlatList style={styles.flatList} contentContainerStyle={[styles.flatListContent, {paddingBottom bottom}]} data={commentsQuery.data} renderItem={({item}) => ( <CommentItem id={item.id} message={item.message} publishedAt={item.published_at} username={item.user.username} /> )} keyExtractor={(item) => item.id.toString()} ListHeaderComponent={ <ArticleView title={title} body={body} publishedAt={published_at} username={user.username} /> } /> ); } const styles StyleSheet. ({ ( ) }); export default ArticleScreen;)