Skip to content

Commit

Permalink
Merge pull request #34 from trbKnl/fix-terminate-vis-engine
Browse files Browse the repository at this point in the history
added code to terminate() so it calls unmount on ReactDom.Root
  • Loading branch information
mellelieuwes committed Apr 1, 2023
2 parents aef72ec + 6e9cca4 commit 7189f59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/framework/visualisation/react/engine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ export default class ReactEngine implements VisualisationEngine {
})
}

terminate (): void {}
terminate (): void {
console.log('[ReactEngine] stopped')
this.root.unmount()
}

renderElements (elements: JSX.Element[]): void {
this.root.render(<Main elements={elements} />)
Expand Down

0 comments on commit 7189f59

Please sign in to comment.