So in my Forum.tsx file, I have a link directing to the corresponding id of the post:
<Link to={`/forum/${value.PostId}`}>
<b>{value.Title}</b>
</Link>
In my app component I want to pass the query parameter somehow and render the ViewPost component:
<Route path={`forum/:postId`} element={<ViewPost />} />
But this is obviously not the right way to do it. I would pass the PostId as a prop to the app component, but I know you can't pass props onto parent components in React. Is there another way or a simpler way to get this done?