MCPcopy
hub / github.com/lit/lit / _$didUpdate

Function _$didUpdate

packages/reactive-element/src/reactive-element.ts:1547–1570  ·  view source on GitHub ↗
(changedProperties: PropertyValues)

Source from the content-addressed store, hash-verified

1545 // Note, this is an override point for polyfill-support.
1546 // @internal
1547 _$didUpdate(changedProperties: PropertyValues) {
1548 this.__controllers?.forEach((c) => c.hostUpdated?.());
1549 if (!this.hasUpdated) {
1550 this.hasUpdated = true;
1551 this.firstUpdated(changedProperties);
1552 }
1553 this.updated(changedProperties);
1554 if (
1555 DEV_MODE &&
1556 this.isUpdatePending &&
1557 (this.constructor as typeof ReactiveElement).enabledWarnings!.includes(
1558 'change-in-update'
1559 )
1560 ) {
1561 issueWarning(
1562 'change-in-update',
1563 `Element ${this.localName} scheduled an update ` +
1564 `(generally because a property was set) ` +
1565 `after an update completed, causing a new update to be scheduled. ` +
1566 `This is inefficient and should be avoided unless the next update ` +
1567 `can only be scheduled as a side effect of the previous update.`
1568 );
1569 }
1570 }
1571
1572 private __markUpdated() {
1573 this._$changedProperties = new Map();

Callers

nothing calls this directly

Calls 3

hostUpdatedMethod · 0.65
firstUpdatedMethod · 0.45
updatedMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…