You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 8-web-components/1-webcomponents-intro/article.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,8 @@ Components may have subcomponents, e.g. messages may be parts of a higher-level
56
56
57
57
How do we decide, what is a component? That comes from intuition, experience and common sense. Usually it's a separate visual entity that we can describe in terms of what it does and how it interacts with the page. In the case above, the page has blocks, each of them plays its own role, it's logical to make these components.
58
58
59
-
- A component has its own JavaScript class.
59
+
A component has:
60
+
- its own JavaScript class.
60
61
- DOM structure, managed solely by its class, outside code doesn't access it ("encapsulation" principle).
61
62
- CSS styles, applied to the component.
62
63
- API: events, class methods etc, to interact with other components.
0 commit comments