Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/website/tar-6.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia authored Apr 15, 2024
2 parents c0f168d + 9592ca9 commit 5b6a8d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions website/docs/guide/micro-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,10 @@ const moduleInfo = {
const ModuleComponent = () => {
const renderNode = useRef(null);
useEffect(() => {
mountModule(moduleInfo, renderNode.current, {});
const dom = renderNode.current;
mountModule(moduleInfo, dom, {});
return () => {
unmoutModule(moduleInfo, renderNode.current);
unmoutModule(moduleInfo, dom);
}
}, []);
return (<div ref={renderNode}></div>);
Expand Down

0 comments on commit 5b6a8d2

Please sign in to comment.