Introduction/API Usage
Unmount Component
Unmount mounted chat component using the unmount method
Use the unmount method to unmount a mounted component and clean up related resources.
Parameters
| Parameter | Type | Description |
|---|---|---|
| container | string | CSS selector for mount container |
Basic Usage
Use Cases
Cleanup on Page Navigation
Conditional Rendering
Component Destroy Hooks
Complete Lifecycle Example
Notes
- After unmounting, the component instance and related DOM elements will be removed
- If you need to use the component again, you must call the
initmethod again - Unmounting a non-existent container will not throw an error, it will fail silently
- It's recommended to unmount components when no longer needed to free up memory resources