unregisterRefreshContainer()

Stops a container from receiving refresh events.

Syntax 

import { LightningElement, wire } from "lwc";
import { unregisterRefreshContainer } from "lightning/refresh";

export function unregisterRefreshContainer(refreshID);

Parameters 

refreshID—(Required) A numeric refreshNode.handle value that uniquely identifies the node of this container on the refresh tree. You obtain the refreshNode.handle value when you call registerRefreshContainer().

Returns 

None.

Usage 

Use the unregisterRefreshContainer() method to remove a refresh container’s registration from the refresh tree. Child contexts are temporarily retained to ensure that they are refreshed, in case unregistration takes place mid-refresh.

You must unregister your component’s container callback methods in disconnectedCallback().

import { unregisterRefreshContainer } from 'lightning/refresh';

disconnectedCallback() {
  unregisterRefreshContainer(this.refreshContainerID);
}

See Also

Release Preview

This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.