I'm reading about lwc properties and came across a statement.
A component that declares a public reactive property can’t set the property value, except at component construction time. A parent component that uses the component in its markup can set the component’s public property value. In our example, the c-todoitem component can’t update the value of the itemName property in the todoitem.js file.
Based on the above statement I can't set a public reactive property(@api
), except for the component construction time. I know we can use getters and setters to set the value, but it does involve declaring a private reactive property(@track
).
In this context what is the meaning of component construction time. Is there another way to set the value of public reactive properties in the declared component without the interference of the private reactive properties?