I want to pass props into a function from the route, my code currently looks like this
Route
<Route path="/person" render={(params) => <ProductDetails {...params} />} />
Code
function ProductDetails(props) {
return (
<div className="section has-text-centered mt-4">
console.log(props)
<h1>Hello</h1>
</div>
);
};
export default ProductDetails;
What am I missing here, please help.