_this.state = { > 31 | match: _this.computeMatch(_this.props.history.location.pathname) code example
Example: react router dom props.history is undefined
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
import { BrowserRouter, Route } from 'react-router-dom';
ReactDOM.render(
<BrowserRouter>
<Route path="/" component={ App }/>
</BrowserRouter>, document.getElementById('root')
);