Created
January 3, 2016 12:00
-
-
Save arqex/067b275aa6ecce0c952c 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
var VideoWrapper = React.createClass({ | |
getInitialState: function(){ | |
return {play: false}; | |
}, | |
render: function() { | |
return ( | |
<Video src="path/to/my/video.mp4" | |
play={ this.state.play } | |
onButtonClick={ () => this.setState({play: !this.state.play}) } /> | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi I see that you use React, so I am sure that you will find interesting the https://reactjs.co - this is the free online convention and tutorial book for React.JS Developers. React is not only the View (in MVC) anymore. ReactJS For Dummies: Why & How to Learn React Redux, the Right Way.