Grammar issues fix
Made some changes to make it more correct.
This commit is contained in:
parent
7460eeba48
commit
c63ce10286
1 changed files with 3 additions and 3 deletions
|
@ -57,14 +57,14 @@ Components may have subcomponents, e.g. messages may be parts of a higher-level
|
||||||
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.
|
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.
|
||||||
|
|
||||||
A component has:
|
A component has:
|
||||||
- its own JavaScript class.
|
- It's own JavaScript class.
|
||||||
- DOM structure, managed solely by its class, outside code doesn't access it ("encapsulation" principle).
|
- DOM structure, managed solely by it's class, outside code doesn't access it ("encapsulation" principle).
|
||||||
- CSS styles, applied to the component.
|
- CSS styles, applied to the component.
|
||||||
- API: events, class methods etc, to interact with other components.
|
- API: events, class methods etc, to interact with other components.
|
||||||
|
|
||||||
Once again, the whole "component" thing is nothing special.
|
Once again, the whole "component" thing is nothing special.
|
||||||
|
|
||||||
There exist many frameworks and development methodologies to build them, each one with its own bells and whistles. Usually, special CSS classes and conventions are used to provide "component feel" -- CSS scoping and DOM encapsulation.
|
There exist many frameworks and development methodologies to build them, each one equipped with it's own bells and whistles. Usually, special CSS classes and conventions are used to provide "component feel" -- CSS scoping and DOM encapsulation.
|
||||||
|
|
||||||
"Web components" provide built-in browser capabilities for that, so we don't have to emulate them any more.
|
"Web components" provide built-in browser capabilities for that, so we don't have to emulate them any more.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue