화면 등록 후에는 ArticleScreen 컴포넌트에서 id 라우트 파라미터를 조회하는 코드를 작성해보세요.
screens/ArticleScreen.tsx
import {RouteProp, useRoute} from '@react-navigation/core'; import React from 'react'; import {View, StyleSheet, Text} from 'react-native'; import {RootStackParamList} from './types'; type ArticleScreenRouteProp = RouteProp<RootStackParamList, 'Article'>; function () { const {params} = useRoute<ArticleScreenRouteProp>(); return ( <View style={styles.block}> <Text>{params.id}</Text> </View> ); } const styles StyleSheet. ({ block {}, }); export default ArticleScreen;