Last active
May 28, 2016 03:14
-
-
Save randika/0dac56481142f7eb3c155ed69abdb43c 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
// Host App | |
var serviceEndpoint = "http://path/to/endpoint"; // Or this could be array => settings = { domain: "", assignmentId: "" } | |
<div id="player"></div> | |
... | |
<AssignmentPlayer | |
configServiceEndpoint = {this.serviceEndpoint} | |
/> | |
//React component | |
var AssignmentPlayer = React.createClass({ | |
propTypes: { | |
configServiceEndpoint: React.PropTypes.string, | |
}, | |
... | |
buildPlayer: function() { | |
new AssignmentPlayer({ | |
configServiceEndpoint: this.props.configServiceEndpoint, | |
}); | |
}, | |
... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment