Created
November 17, 2018 17:26
-
-
Save sag1v/71eebbe5e5ef267085b8d7c4f7b3f773 to your computer and use it in GitHub Desktop.
react integration with other applications article
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
window.ReactCounter = { | |
mount: (props) => { | |
const el = document.getElementById('counter-app'); | |
ReactDOM.render(<Counter {...props} />, el); | |
}, | |
unmount: () => { | |
const el = document.getElementById('counter-app'); | |
ReactDOM.unmountComponentAtNode(el); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment