function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kshitij LawateKshitij Lawate 

Basic Question about '@track' decorator

I have a (probably very) basic question about @track decorator.

I modified the helloExpressions LW Component from Sample Gallery as below. Here the values FirstName and lastName are no longer decorated as Tracked properties. I am adding their concatenated value to another tracked property capitalFullName.
I do not have the contributing factors for 'uppercasedFullName' tracked, still this updates the UI for both output values uppercasedFullName and capitalFullName when firstname or lastname are updated from input screen. However if I remove track decorator for capitalFullName, the UI refresh stops working. If I am not tracking the direct contributors uppercasedFullName, why does it still work when I am using them somewhere else with a tracked property?

You can fine original question with code snippet here:
https://salesforce.stackexchange.com/questions/287519/basic-question-about-track-decorator
Kshitij LawateKshitij Lawate
I found something additional on this. Not sure if it is designed this way or a bug, but looks like when I have at-least one tracked property on UI, it refreshes the whole UI. If I add another non-tracked property with all features, assignments similar to 'capitalFullName' and show it up on UI; even that value is updated. Considering, this new property is not tracked and its contributing properties are not tracked, i should not be seeing any updates for that property on UI.