score:0

let retrieve_var = props.location.state

score:0

import { withRouter } from 'react-router-dom';

...

class Overview extends React.Component {
  ...

  componentDidMount() {
    // access location prop
    const { date } = this.props.location.state;
    ...
  }

  ...
}

export default withRouter(Overview);

score:1

const {date} = props.location.state;

Related Query

More Query from same tag