# Not working react code

**URL:** <https://forum.codewithmosh.com/t/not-working-react-code/20716>\
**Category:** Uncategorized\
**Created:** [June 9, 2023, 7:04am UTC](https://forum.codewithmosh.com/t/not-working-react-code/20716 "2023-06-09T07:04:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![svamptra](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@svamptra](https://forum.codewithmosh.com/u/svamptra)\
**Post date:** [June 9, 2023, 7:04am UTC](https://forum.codewithmosh.com/t/not-working-react-code/20716/1 "2023-06-09T07:04:28Z")

</div>

```auto
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 ?
