I know that router.push does not redirects you to the same page. It happens nothing even if you click the link. but for example, "Similar Products" section would be so common and you want to let visitors see other product pages with the same screen file.
so how do I have to handle this if I want to do router.push to different "id"s through the same product/[id].tsx screen.
"expo": "~52.0.28", "expo-router": "~4.0.17", "react": "18.3.1", "react-native": "0.76.6",
Made a simple screen and confirmed the link is not working.
import { View, Text, TouchableOpacity } from "react-native";
import { useRouter } from "expo-router";
export default function ProductScreen() {
const router = useRouter();
return (
<View>
<TouchableOpacity
onPress={() => {
router.push(`/product/AGS92FJ3CHKPBQ5`);
}}
>
<Text>Similar Product Link1</Text>
</TouchableOpacity>
<TouchableOpacity onPress={() => router.push(`/product/6FGN2C9KH3P5Y48`)}>
<Text>Similar Product Link2</Text>
</TouchableOpacity>
</View>
);
}