Skip to content

Lit change-in-update warnings from many components #1269

@medmunds

Description

@medmunds

Describe the bug

When running in dev mode, many wa-* components cause Lit to warn about "scheduled an update after an update completed" when first rendered.

The equivalent Shoelace components did not issue this warning.

To Reproduce

Steps to reproduce the behavior:

  1. Create a custom LitElement that renders some Web Awesome components, e.g., wa-button
  2. Run a development server and view your project
  3. Examine the browser console:

Results:

Element wa-button scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update. See https://lit.dev/msg/change-in-update for more information.

Expected: did not generally occur with Shoelace. (There were some specific component/property value combos that could cause that warning, but not just rendering components in the initial state.)

Demo

Here's a codepen that loads Lit in dev mode and renders wa-button and sl-button side by side. Notice the console output warns about wa-button but not sl-button.
https://codepen.io/mvedmunds/pen/azvWxYq?editors=0011

Screenshots

Image

More information

At a minimum, these components are affected in 3.0.0.beta-4:

  • wa-button
  • wa-card
  • wa-checkbox
  • wa-input
  • wa-radio
  • wa-radio-group
  • wa-select
  • wa-slider

(I'm using [email protected], but saw the same warning with earlier versions.)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions