import { Route, Link, BrowserRouter as Router } from 'react-router-dom';
const routing = (
<Router>
<div>
<Route path="/" component={App} />
</div>
</Router>
)
ReactDOM.render(routing, document.getElementById('root'))
<Switch>
<Route exact path="/" component={App} />
<Route path="/search" component={Results} />
</Switch>
const Results = ({ location }) => {
const { search } = location;
// do something with search
return ( ... );
};
'?кeyword=xxx&subject=AAA&filter2=BBB'