score:0

  const {
    props.params: { userId },
  } = match;

score:1

let transformedPath = this.props.location.pathname.split('/')
transformedPath[position] = newValue;
this.props.history.push(trasnformedPath.join('/'))

Related Query

More Query from same tag