Chapter 4: LWC Tutorial – Attributes and Properties

Chapter 4: LWC Tutorial – Attributes and Properties

On November 17, 2022, Posted by , In LWC Tutorial, By , With Comments Off on Chapter 4: LWC Tutorial – Attributes and Properties

These are very interchangeable terms and confusing, usually, when we talk about attributes it’s in the HTML context and properties are in the JavaScript context.

JavaScript is case sensitive while HTML is not and that is why we use the kebab case when binding any javascript property in HTML. 

For example in JavaScript item name and itemName are two different variables, kebab case in HTML tells the engine the next character is the upper case for example above two will be used in HTML as itemname and item-name respectively.

Comments are closed.