Description
A customer brought up an issue with a public property that never rehydrates.
Issue: ability to decorate a special 'key' property with @api.
playground link: https://playground.lwcjs.org/projects/mY3ddUxFH/4/edit
ex:
// parent.html
<c-child key={childKey}></c-child>
// parent.js
export default class Child extends LightningElement {
get childKey() {
return 'key value from parent';
}
}
// child.js
export default class Child extends LightningElement {
@api key = 'my key';
}
// child.html
<template>
<h2>key value from parent: {key}</h2>
</template>