title: Redirecting from a search form to a results page in reactjs
body: <p>I am currently developing my first reactjs app and am having difficulties navigating from a Search component to a Results component using react-router-dom.</p>
  
  <p>The search component accepts entries from the user, performs a get request with axios and updates its results state.</p>
  
  <pre><code>import axios from 'axios';
  import React, {Component} from 'react';
  import {Button} from 'react-bootstrap';
  import Results from './Results';
  
  class Search extends Component {
    constructor(props) {
      super(props);
      this.state = {
        results: [],
        term: '',
      };
  
      this.submit = this.submit.bind(this);
      this.changeTerm = this.changeTerm.bind(this);
    }
  
    changeTerm(event) {
      this.setState({term: event.target.value});
    }
  
    submit(event) {
      let url = 'http://api.example.com/results?q=' + encodeURI(this.state.term) + '&amp;json=1';
      axios.get(url)
        .then(response =&gt; {
          let data = {
            results: response.data,
          };
          this.setState(data);
        })
        .catch(error =&gt; console.log(error));
    }
  
    render() {
      return (
        &lt;div&gt;
          &lt;form onSubmit={this.submit}&gt;
            &lt;input onChange={this.changeTerm}/&gt;
            &lt;Button type="submit" bsStyle="primary"&gt;Find&lt;/Button&gt;
          &lt;/form&gt;
          &lt;Results data={this.state.results}/&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default Search;
  </code></pre>
  
  <p>The results are currently displayed directly beneath the search component, but I would like to redirect the results to a new page with a different url. Both pages have to be different, because they have completely different structures and styles and must point to different urls.</p>
  
  <p>Is it possible to forward the results from the Search component to the Results Component using react router? I am also open to other solutions which are not based on react router.</p>