import React, { Component } from "react";
class ProductDetails extends Component {
handleSave = () => {
// Navigate to /products
};
render() {
return (
<div>
<h1>Product Details - {this.props.match.params.id} </h1>
<button onClick={this.handleSave}>Save</button>
</div>
);
}
}
export default ProductDetails;
In the above code this.props.match.params.id is not getting the data ?