Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow components to opt in to native custom element lifecycle #4252

Open
nolanlawson opened this issue Jun 3, 2024 · 0 comments
Open

Allow components to opt in to native custom element lifecycle #4252

nolanlawson opened this issue Jun 3, 2024 · 0 comments

Comments

@nolanlawson
Copy link
Collaborator

nolanlawson commented Jun 3, 2024

Edit: there is now an RFC.

#4249 indicates that it may not be safe to compose native and synthetic lifecycle components together. For that reason, we should perhaps treat it similarly to native vs synthetic shadow DOM, and allow components to opt-in instead. E.g.:

export default class extends LightningElement {
  static lifecycleSupportMode = 'native' // native
  static lifecycleSupportMode = 'reset' // synthetic
}

There is an open question about whether this should affect child trees, similar to native shadow DOM when using shadowSupportMode. It's not clear that this would help much, since #4249 is more around slotting rather than parent-child relationships (although the same issues would also apply to parent-child relationships).

Related: #3198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant