title: How to POST new data via Ajax on React JS
body: <p>Take in consideration this <a href="http://codepen.io/teddarcuri/pen/EKWMvE" rel="nofollow noreferrer">example</a></p>
  
  <p>I'm really new at React, so this is how I create my new app</p>
  
  <pre><code>class App extends React.Component {
    constructor(props){
      super(props)
      this.state = { //initial empty details
        details : {}
      }
    }
    componentDidMount(){
      //place the ajax call where ever you need
      $.ajax() //call ajax
      .done((data) =&gt; {
        this.setState({ //this setState will re render the UI with the new state
          details: { //change the key value pairs as needed
            id: data.id,
            trackInfo: {
              title: data.title,
              artist: data.artist,
              album: data.album,
            },
            trackUrl: data.trackUrl,
            albumArt: data.albumArt,
          }
        })
      })
    }
      render() {
        if(!this.state.details.id) return false //renders nothing when no details available
          return (
              &lt;div id="app"&gt;
                  &lt;MusicPlayer
                      id={this.state.details.id}
                      visualizerType="RIPPLES"
                      theme={darkTheme}
                      trackInfo={this.state.details.trackInfo}
                      trackUrl={this.state.details.trackUrl}
                      albumArt={this.state.details.albumArt}
                      utilities={true}&gt;
                  &lt;/MusicPlayer&gt;
              &lt;/div&gt;
          )
      }
  }
  
  ReactDOM.render(
      &lt;App /&gt;,
      document.getElementById("app")
  );
  </code></pre>
  
  <p>The plan is to create a button where on click it display a new MusicPlayer element. Eg.</p>
  
  <pre><code>&lt;MusicPlayer
      id="3"
      visualizerType="RIPPLES"
      theme={lightTheme}
      trackInfo={{
          title: "Guns &amp; Dogs",
              artist: "Portugal, The Man",
                  album: "The Satanic Satanist"
      }}
      trackUrl="https://s3-us-west-2.amazonaws.com/teddarcuri.monarch/Portugal.+The+Man+-+Guns+%26+Dogs+-+The+Satanic+Satanist.mp3"
      albumArt="http://ecx.images-amazon.com/images/I/61X7CiBpZ6L.jpg"
      utilities={true}&gt;
  &lt;/MusicPlayer&gt;
  </code></pre>
  
  <p>How can I proper POST new JSON data via Ajax to the render?</p>