Skip to content

Instantly share code, notes, and snippets.

@sag1v
Created November 17, 2018 17:19
Show Gist options
  • Save sag1v/d5de8c0f90b2bb3a4879e625e15a4277 to your computer and use it in GitHub Desktop.
Save sag1v/d5de8c0f90b2bb3a4879e625e15a4277 to your computer and use it in GitHub Desktop.
react integration with other applications article
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