title: how to select random api by submit button in react
body: <p>i select random data in api with button click , dont work my code 
  a code need code in submitChange function  </p>
  
  <pre><code>export class MemeGenerator extends React.Component {
  constructor (props) {
  super(props)
  this.state = {
    apiData: []
  }
  this.submitChange = this.submitChange.bind(this)
  }
  componentDidMount () {
  fetch('https://api.imgflip.com/get_memes')
    .then(response =&gt; response.json())
    .then(data =&gt; {
     this.setState({
       apiData: data
      })
      console.log(this.state.apiData)
    })}
  </code></pre>
  
  <p>OnChange Function ?????</p>
  
  <pre><code>submitChange () {
  }
  </code></pre>
  
  <p>and render select img from api </p>
  
  <pre><code>render () {
  return (
    &lt;div&gt;
      &lt;form onSubmit={this.submitChange}&gt;
        &lt;button onClick={this.submitChange} value='Submit'&gt;Gen&lt;/button&gt;
     &lt;div&gt;
         &lt;img src='http://i.imgflip.com/1bij.jpg' onLoad={this.loadImg} /&gt;
     &lt;/div&gt;
      &lt;/form&gt;
    &lt;/div&gt;
  )}}
  </code></pre>