Created
September 16, 2015 19:56
-
-
Save gajus/9fe6ce578ebae3c1f66c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import YouTubePlayer from 'react-youtube-player'; | |
class Parent extends React.Component { | |
constructor () { | |
super(); | |
this.state = {}; | |
setInterval(() => { | |
this.setState({ | |
data: Math.random() | |
}); | |
}, 500); | |
} | |
render () { | |
return <YouTubePlayer data={this.state.data} />; | |
} | |
} | |
ReactDOM.render(<Parent />, document.getElementById('app')); |
Velveeta
commented
Sep 16, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment