Export remove function to unmount react components
This commit is contained in:
parent
eb6b733157
commit
80c50d08d1
3 changed files with 10 additions and 3 deletions
2
dist/mcf-components.js
vendored
2
dist/mcf-components.js
vendored
File diff suppressed because one or more lines are too long
2
dist/mcf-components.js.map
vendored
2
dist/mcf-components.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -1075,4 +1075,11 @@ function MCF_render(schemeToRender, referenceSelector) {
|
|||
);
|
||||
}
|
||||
|
||||
export {MCF_render as render};
|
||||
function MCF_remove(referenceSelector){
|
||||
ReactDOM.unmountComponentAtNode(document.querySelectorAll(referenceSelector)[0]);
|
||||
}
|
||||
|
||||
export {
|
||||
MCF_render as render,
|
||||
MCF_remove as remove
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue