@lit-labs/scoped-registry-mixin
Advanced tools
Changelog
@lit/reactive-element
- 1.0.0
@lit/reactive-element
is a new package that factors out the base class that provides the reactive update lifecycle based on property/attribute changes to LitElement
(what was previously called UpdatingElement
) into a separate package. LitElement
now extends ReactiveElement
to add lit-html
rendering via the render()
callback. See ReactiveElement API for more details.UpdatingElement
has been renamed to ReactiveElement
.updating-element
package has been renamed to @lit/reactive-element
.@internalProperty
decorator has been renamed to @state
._getUpdateComplete
to getUpdateComplete
.reflect: true
and its toAttribute
function returns undefined
the attribute is now removed where previously it was left unchanged (#872).unhandledrejection
event handler on window.renderRoot
is now created when the element's connectedCallback
is initially run.requestUpdateInternal
. The requestUpdate
method is now identical to this method and should be used instead.initialize
method has been removed. This work is now done in the element constructor.static addInitializer
for adding a function which is called with the element instance when is created. This can be used, for example, to create decorators which hook into element lifecycle by creating a reactive controller (#1663).connectedCallback
, disconnectedCallback
, willUpdate
, update
, and updated
. To ensure it has access to the element lifecycle, a controller should be added in the element's constructor. To add a controller to the element, call addController(controller)
.removeController(controller)
which can be used to remove a controller from a ReactiveElement
.willUpdate(changedProperties)
lifecycle method to UpdatingElement. This is called before the update
method and can be used to compute derived state needed for updating. This method is intended to be called during server side rendering and should not manipulate element DOM.