Pitfalls and checklist Common mistakes Before you ship Factories are synchronous and return values directly. Siblings are accessed inside functions, not at construction time. Consuming layers type their arguments as PublicLayer<…>. init is called per layer, lowest first. dispose is called in the reverse order. Each object has at most one onInit and one onDispose. Can one factory depend on a later one? Only through deferred access. Either reorder the definitions or touch the other component inside a function. Is there a global container? No. Each creator call builds a new, independent container.
Pitfalls and checklist
Common mistakes
Before you ship
PublicLayer<…>.initis called per layer, lowest first.disposeis called in the reverse order.onInitand oneonDispose.Can one factory depend on a later one?
Only through deferred access. Either reorder the definitions or touch the other component inside a function.
Is there a global container?
No. Each creator call builds a new, independent container.