Closed
Description
In what scenarios do you need this feature?
I create an excalidraw plugin for display excalidraw file in a tab. But when close the tab, error occured.
I need to run root.unmount()
before the element of content destroyed. Thx
Describe the optimal solution
Add an option in this.addTab(options),
// run this code before
addTab({
/// ...
beforeDestroy() {
// unmount your app
}
)}
Describe the candidate solution
No response
Other information
No response
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
🎨 siyuan-note/siyuan#8467
🎨 siyuan-note/siyuan#8467
🎨 #8467
[-]Plugin API: tab options 'beforeDestroy' to control react root unmount before tab element destroyed[/-][+]Plugin API tab options `beforeDestroy` to control react root unmount before tab element destroyed[/+]