showing results for - "react router redirect with query params"
Agustina
06 Apr 2016
1import { withRouter } from 'react-router-dom';
2
3class SearchComponent {
4
5    // Component Code goes here
6
7    onSubmit(){
8        let queryString = "q=" + this.state.q;
9        this.props.history.push(`/search/hotels?${queryString}`);
10    }
11}
12
13export default withRouter(SearchComponent)
14