I have the following shouldUpdate
call
shouldUpdate(changedProperties: PropertyValues): boolean {
if (changedProperties.has("mobile") &&
!this._isOpeningDialog &&
this._testStore.isShareSheetOpen) {
this._testStore.closeShareSheet();
}
return this._isOpeningDialog;
}
I need to check if the mobile property has changed and if so update the element. However, this seems like an anti-pattern. Does anyone have a better way to do this?
this._testStore.closeShareSheet() causes the element to re-render and shouldUpdate to be called.