Question: My react router works fine.. but I would like get the date from the `Path` as the `title` which expects a string. 

```
  <Route exact path="/meeting/:date"
              breadcrumb="Meetings"
              title={DATE}
              component={(props) => (
                <FooComponent
                  date={props.match.params.date} />
              )}
            />

```

thanks

Answer: 
There is a new api in `react-router-dom 5.1`

<https://github.com/ReactTraining/react-router/releases/tag/v5.1.0>

```
import {useParams} from "react-router-dom";

function MyComponent(){
    const {date} = useParams()
}

```
I use [Helmet](https://github.com/nfl/react-helmet) for that, it allows you to update the title, meta, scripts and basically anything related to the header.

Once you install it, just add the following code to `FooComponent` or to a common parent component.

```
<Helmet>
  <title>{props.match.params.date}</title>
</Helmet>

```