Summary
Create a new example under examples/functional/ that demonstrates deep nesting of components, mixing both classic (class-based) and new functional components.
Rationale
To properly showcase the power and flexibility of the new functional component architecture, we need an example that goes beyond simple parent-child relationships. This example should illustrate:
- A functional component hosting multiple child components.
- A functional component hosting a classic component, which in turn hosts another functional component.
- A classic component hosting a functional component.
- State being passed down through multiple levels of nesting.
- The reactive updates (
component.set()) working correctly through the entire hierarchy.
This will serve as a clear, practical guide for developers on how to structure complex UIs and manage component composition effectively.
Acceptance Criteria
- A new folder is created under
examples/functional/.
- The example contains at least three levels of component nesting.
- The nesting hierarchy includes a mix of functional and classic components.
- The top-level component's state drives changes in the deeply nested children.
- The example is clean, well-documented, and easy to understand.
Intake contract — Sophie, 2026-11-06
The five original acceptance criteria above are unchanged. Current siblings cover functional-to-classic hosting and nested template markup; this example adds the missing functional → classic → functional component chain and its state propagation. The executed composition probe demonstrated current Engine support without a source change.
| Target surface |
Source of authority |
Behavior |
Fallback / edge case |
Docs |
Evidence |
New examples/functional/nestedComponents/ app |
Original AC-1–3; hostComponent/ sibling |
A functional root owns a classic relay and a direct functional sibling; the relay owns a functional child |
It is an interoperability example, not a change to class-based application guidance |
Class/method JSDoc and visible hierarchy labels |
Native example route and component parent-chain inspection |
Root named value and message configs |
Original AC-4; functional.component.Base#diffAndSet, core.Base#set |
Visible controls apply both configs with set(); relay config hooks forward them to its existing child |
Stable owner-derived IDs preserve instances; the classic relay does not rebuild its items on an update |
Explain parent-controlled configs at the forwarding boundary |
Native inputs + rendered values + App Worker configs |
| Independent leaf counters |
Original AC-5; functional/useConfig.mjs |
Two instances of one leaf class keep distinct local click counts as root values change |
Re-rendering does not reset a counter or accumulate click handlers |
Explain local state beside the hook |
Native clicks before/after root updates; retained DOM nodes |
| Owned child lifetime |
functional.component.Base#destroy, container.Base#destroy |
Removing/destroying the root retires the relay, both leaves and their owned buttons |
No module-global singleton IDs or manual instance registry |
Ownership comments in the example |
App Worker registry and DOM absence after root destruction |
Prescription checked: examples/functional/hostComponent/ supplies the app shell and hosting pattern; src/functional/component/Base.mjs already reconciles child configs through set(). The classic relay uses ordinary reactive config hooks. No Engine API, global provider, custom renderer, or new state abstraction is required.
Decision Record impact: none. The later FM-specific class conversion in #14745 does not supersede this dedicated interoperability example.
Summary
Create a new example under
examples/functional/that demonstrates deep nesting of components, mixing both classic (class-based) and new functional components.Rationale
To properly showcase the power and flexibility of the new functional component architecture, we need an example that goes beyond simple parent-child relationships. This example should illustrate:
component.set()) working correctly through the entire hierarchy.This will serve as a clear, practical guide for developers on how to structure complex UIs and manage component composition effectively.
Acceptance Criteria
examples/functional/.Intake contract — Sophie, 2026-11-06
The five original acceptance criteria above are unchanged. Current siblings cover functional-to-classic hosting and nested template markup; this example adds the missing functional → classic → functional component chain and its state propagation. The executed composition probe demonstrated current Engine support without a source change.
examples/functional/nestedComponents/apphostComponent/siblingvalueandmessageconfigsfunctional.component.Base#diffAndSet,core.Base#setset(); relay config hooks forward them to its existing childfunctional/useConfig.mjsfunctional.component.Base#destroy,container.Base#destroyPrescription checked:
examples/functional/hostComponent/supplies the app shell and hosting pattern;src/functional/component/Base.mjsalready reconciles child configs throughset(). The classic relay uses ordinary reactive config hooks. No Engine API, global provider, custom renderer, or new state abstraction is required.Decision Record impact: none. The later FM-specific class conversion in #14745 does not supersede this dedicated interoperability example.