Skip to content

Commit

Permalink
fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon committed Aug 5, 2021
1 parent 061a55f commit 49c1710
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dev_docs/getting_started/hello_world_plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ export class HelloWorldPlugin implements Plugin {
id: 'helloWorld',
title: 'Hello World',
async mount({ element }: AppMountParameters) {
return ReactDOM.render(<div>Hello World!</div>, element);
ReactDOM.render(<div>Hello World!</div>, element);
return () => ReactDOM.unmountComponentAtNode(element);
},
});
}
Expand Down
3 changes: 2 additions & 1 deletion examples/hello_world/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export class HelloWorldPlugin implements Plugin<void, void, SetupDeps> {
id: 'helloWorld',
title: 'Hello World',
async mount({ element }: AppMountParameters) {
return ReactDOM.render(<div id="helloWorldDiv">Hello World!</div>, element);
ReactDOM.render(<div id="helloWorldDiv">Hello World!</div>, element);
return () => ReactDOM.unmountComponentAtNode(element);
},
});

Expand Down

0 comments on commit 49c1710

Please sign in to comment.