React handleClick in parent
<p>Had some problem before setting accessible instance variable in parent from child.</p>

<p>As it turns out you cannot SET parent vars from child in the manner that i was going for. I proceeded and successfully called setState, but the state itself seem to change each time i set it, im not overwriting the Howler state (this.state.howler), i just instantiate another one... </p>

<p>Didn't solve my original problem with music that plays simultaneously.</p>

<p>The state shouldn't change and the previous state should(?) be overwritten when   </p>

<p><code>this.setState({
    howler: howlerInstance,
});</code> </p>

<p>in SongContainer is called? Don't get it at all.</p>

<pre><code>    // Components
        var SongContainer = React.createClass({
            getInitialState: function() {
                return {
                    data: [],
                    howler: 0,
                };
            },
            handleUserInput : function(howlerInstance) {
                this.state.howler.stop();

                this.setState({
                    howler: howlerInstance,
                });

                this.state.howler.play();
            },
            loadTrackListFromServer: function() {
                $.ajax({
                url: this.props.url,
                dataType: 'json',
                cache: false,
                success: function(data) {
                    this.setState({data: data.playlist});
                }.bind(this),
                error: function(xhr, status, err) {
                    console.error(this.props.url, status, err.toString());
                }.bind(this)
                });
            },
            componentDidMount: function() {
                this.loadTrackListFromServer();
                setInterval(this.loadTrackListFromServer, this.props.pollInterval);

                this.state.howler.stop().play();
            },
            render: function() {
                return (
                &lt;div className="container songsContainer"&gt;
                    &lt;SongList howler={this.state.howler} onUserInput={this.handleUserInput} data={this.state.data} /&gt;
                &lt;/div&gt;
                );
            }
        });

        var SongList = React.createClass({
            handleChange: function(howlerInstance) {
                this.props.onUserInput(
                    howlerInstance
                );
            },
            render: function() {
                var i = 0;
                var self = this;
                var trackNodes = this.props.data.map(function(track, i) {
                    return (
                        &lt;Song onUserClick={self.handleChange} key={i} &gt;
                            {track}
                        &lt;/Song&gt;
                    );
                    i++;
                });

                return (
                    &lt;div className="row"&gt;
                        &lt;div className="col-sm-12"&gt;
                            &lt;div className="list-group-wrapper"&gt;
                                &lt;div className="list-group"&gt;
                                {trackNodes}
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                );

            }
        });

        var Song = React.createClass({
            handleClick : function(e) {
                console.log(2);
                e.preventDefault();
                var song = new Howl({
                    urls: [e.target.href]
                });

                this.props.onUserClick(
                    song
                );
            },
            render: function() {
                return (
                &lt;a href={'/static/mp3s/' + this.props.children.toString()} onClick={this.handleClick} className="list-group-item song"&gt;
                    {this.props.children}
                &lt;/a&gt;
                );
            }
        });

        ReactDOM.render(
            &lt;SongContainer url="/playlist" pollInterval={2000} /&gt;,
            document.getElementById('content')
</code></pre>