Synchronize Lightning Web Component Data Without a Page Refresh Using RefreshView API
Whether user-driven or app-invoked, the ability to synchronize data without reloading an entire page is a key user experience requirement.
The new lightning/refresh module and RefreshView API provide a standard way to refresh component data in Lightning web components (LWC) and Aura components.
Previously, LWC lacked a data refresh API and could only refresh using an Aura wrapper and the legacy force:refreshView, which doesn’t meet the requirements of modern web development.
RefreshView API’s detailed control of refresh scope lets developers create refined user experiences while maintaining backward compatibility.
This feature, now generally available, includes some changes since the last release.
To use this feature Lightning Web Security (LWS) must be enabled in the Salesforce org.
RefreshView API updates the data for a specific hierarchy of components, known as a view, without reloading an entire page.
This refresh ensures complete synchronization with data externally sourced by components that subscribe to the refresh event in that view.
RefreshView API supports refreshes that are triggered by end users or web components.
RefreshView API provides a standard mechanism for data refresh experiences in LWC components, allowing flexible control of refresh scopes.
RefreshView API can refresh data for Salesforce platform containers and custom LWC and Aura components.
The base Lightning Aura components currently don’t support RefreshView API.
Lightning Locker doesn’t support RefreshView API.
Follow Us