In Lightning Web Component, we need to maintain the case for Class Name, Variable Name, Component Name etc.
Before going to describe, we need to focus on the respective cases.
Camel Case: Each word in the middle of the respective phrase begins with a capital letter.
Pascal Case: It is a subset of Camel Case where first letter always is capitalized.
Kebab Case: Respective phrase will be transferred to all lowercase with hyphen(-) separating words.
Snake Case: Respective phrase will be separated with underscore(_), no spaces, initial letter with lowercase and first letter with lowercase or uppercase.
So, we will check each case with this phrase “welcomeWindow“.
|Camel Case||Pascal Case||Kebab Case||Snake Case|
|Generally, it's used in variable names.||Generally, it's used in class names.||At the time of component rendering or calling a component or set attribute name from other component in LWC, kebab case is used.||Generally, it's used in C/Python language.|
8,844 total views, 21 views today