Data binding
The template reads JavaScript fields. Assign a new value in JavaScript and the template updates. It does not write back.
One direction
{greeting} reads the field and prints it. Assign this.greeting = 'Hello, team' and the paragraph updates. Typing on the page does not change the field unless you handle an event and assign it yourself.
That one-way flow is the binding model. The JavaScript field is the source of truth.
What the framework notices
Strings, numbers, and booleans update when you assign them. The framework compares the new value with ===.
Assigning a new object or a new array is also noticed. Decorate the field with @track when you mutate an object or array in place, such as this.row.label = 'Later', and the template must follow that inner change. @track watches plain objects and arrays. It does not watch Date, Map, Set, or a class instance.
Getters
A getter used in the template runs again after a field it reads changes. Keep the getter free of side effects, because a render can call it more than once.
Example
javascript
import { LightningElement } from 'lwc';
export default class Greeting extends LightningElement {
greeting = 'Hello';
rename() {
this.greeting = 'Hello, team';
}
}