IPlaceholderCreateContentOptions interface
Options for the PlaceholderProvider.tryCreateContent() method.
Properties
on |
An optional callback that will be invoked when the PlaceholderContent object is disposed. |
Property Details
onDispose
An optional callback that will be invoked when the PlaceholderContent object is disposed.
onDispose?: (placeholderContent: PlaceholderContent) => void;
Property Value
(placeholderContent: PlaceholderContent) => void
Remarks
To avoid a resource leak, use this callback to free any resources that were allocated when the placeholder content was rendered. For example, if ReactDOM.render() was used to mount a React component, then the onDispose handler might call ReactDOM.unmountComponentAtNode() to unmount it.