For example i redirected in my spa on localhost:3000/ProductPage/014 How can i take '014' value to my react variable?
      <Route exact
        path="/ProductPage/:id"
        render={() => <ProductPage data={data} />}
      /> 
For example i redirected in my spa on localhost:3000/ProductPage/014 How can i take '014' value to my react variable?
      <Route exact
        path="/ProductPage/:id"
        render={() => <ProductPage data={data} />}
      /> 
 
    
    Assuming you are using react-router-dom, You can use useParams(). 
import {
  useParams
} from "react-router-dom";
then in your component ->
let { id } = useParams();
For more detailed example you can see this
