A microframework adds focused application structure or functionality while imposing less architecture than a larger framework. It can coordinate custom Web Components without replacing their local implementation details. section 1.3
Microframeworks are useful when an application needs:
- A middle ground between fully custom Web Components and an opinionated larger framework. section 1.3
- Small libraries for concerns such as data binding, routing, or event coordination. section 1.3
- A way to route communication across distant parts of the DOM when ordinary event bubbling is insufficient. section 1.3
Color picker coordination
A color picker can contain RGB text inputs and sliders as nested Web Components. When normal event bubbling cannot reach a distant DOM section, an event bus can route the color change and report its hexadecimal value. section 1.3
Figure 1.9. If normal event bubbling is not desirable, with a bit of code, you can create an event bus system to route events where you want.
Use the event-bus diagram to see how a small coordination layer can route events beyond normal bubbling. section 1.3
