title: How to use jquery ajax in reactjs
body: <p>I want to use jquery ajax in reactjs. but it return can not post insert.php.
  and another question is how can i access this.state object and this.setSate on success?</p>
  
  <pre><code>class Name extends React.Component{
     constructor(){
        super();
        this.state={name:''}
    }
    btnClick=()=&gt;{
      $.ajax({
          url:'insert.php',
          type:'POST',
          dataType:'json',
          data: JSON.stringify({me:'Hamid'}),
          success:function (data,status ,xhr) {
              alert(data.name)
          }
      })
  
  }
  render() {
      return(
          &lt;div&gt;&lt;span&gt;{this.state.name}&lt;/span&gt;
          &lt;button type='button' onClick={this.btnClick}&gt;show&lt;/button&gt;
          &lt;/div&gt;
      )
  }
  }
  
   ReactDOM.render(&lt;Name/&gt;,document.getElementById('root1'));
  </code></pre>