Last active
April 17, 2021 14:16
-
-
Save AbhiAgarwal192/adc96deb2cd456af3c9b69357e09673c 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import TableComponent from './Table/Table'; | |
window.renderTable = (containerId) => { | |
ReactDOM.render( | |
<TableComponent />, | |
document.getElementById(containerId), | |
); | |
}; | |
window.unmountTable = containerId => { | |
ReactDOM.unmountComponentAtNode(document.getElementById(containerId)); | |
}; | |
if (!document.getElementById('table-container')) { | |
ReactDOM.render(<TableComponent />, document.getElementById('root')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment