Last active
May 1, 2018 16:12
-
-
Save ramubotsplash/69cb48f39fea4736cd0fe5efd99da718 to your computer and use it in GitHub Desktop.
ReactToJs
This file contains 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
// FROM ReactJs | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
let rootEl = document.getElementById('botsplash-chat-root'); | |
ReactDOM.render( | |
<HostApp | |
appId={appId} | |
serverUrl={serverUrl} | |
settings={settings} | |
... | |
/>, | |
rootEl, | |
); | |
// TO Js | |
let rootEl = document.getElementById('botsplash-chat-root'); | |
app = new HostApp(rootEl, { | |
appId, | |
serverUrl, | |
settings, | |
.... | |
}); | |
app.componentDidMount(); | |
app.render(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment