lwc
lwc copied to clipboard
feat: accept `config` in `lwc:dynamic`
Details
Supersedes #2604
lwc:dynamic after this change accepts an object {props: Record<string, any>, constructor: LightningElementConstructor}. We're doing only props for now, since the ask is only for props. We'll enable attrs, event listeners if required.
RFC: https://github.com/salesforce/lwc-rfcs/pull/57
The primary difference is to make it work in compat mode as well. We define a function dereference that we pass from template to runtime that does just dereferencing. But since the template is compiled in compat mode, proxies work properly.
Does this pull request introduce a breaking change?
- ✅ No, it does not introduce a breaking change.
Does this pull request introduce an observable change?
- ✅ No, it does not introduce an observable change.