You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not use context decorators when sub-classing, but this is not really a workaround
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
lit: 2.3.1; @lit-labs/context: 0.1.3
Browser/OS/Node environment
Chrome stable latest, linux mint.
The text was updated successfully, but these errors were encountered:
christophe-g
changed the title
[labs/context] @contextProvided and @contextProvider decorators polute base class when sub-classing
[labs/context] @contextProvided and @contextProvider decorators pollute base class when sub-classing
Sep 26, 2022
I am aware we all are very busy, so asking this mostly for planning purpose on my end.
I can also try to have a go (without fixed promises, given my limited exposure to decorators and current time availability), if any pointer is provided.
Which package(s) are affected?
Context (@lit-labs/context)
Description
Using decorators to declare context in a sub-class adds it to the base class.
Any instance of Base will have 2 controllers, its own AND the one declared in the exended class.
Expected behavior: It should only have one controller.
Reproduction
See https://lit.dev/playground/?linkId=8223273#gist=4875267ed996afc7bad538e17fe80907
Workaround
Do not use context decorators when sub-classing, but this is not really a workaround
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
lit: 2.3.1; @lit-labs/context: 0.1.3
Browser/OS/Node environment
Chrome stable latest, linux mint.
The text was updated successfully, but these errors were encountered: