Skip to content

Commit 400e163

Browse files
authored
Create WhenToUse
1 parent 03a8a1f commit 400e163

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

WhenToUse

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
If a sub-part could be solved by a template
2+
```const subPart = html``;```
3+
, don't make a component/shadowDom?
4+
5+
If a template fires events, wrap it in a component. Especially if it's repeated.
6+
7+
There's a "spin-up" cost to registering a component, as well as the boilerplate needed to create it.

0 commit comments

Comments
 (0)