Created
November 17, 2018 17:19
-
-
Save sag1v/d5de8c0f90b2bb3a4879e625e15a4277 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: () => { | |
const el = document.getElementById('counter-app'); | |
ReactDOM.render(<Counter />, 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