LearnNewsExamplesServices
Frontmatter
id8575
titleCreate Guide: Declarative Config Merging & Structural Injection Pattern
stateClosed
labels
documentationenhancementai
assigneestobiu
createdAtJan 12, 2026, 3:45 AM
updatedAtJan 12, 2026, 3:51 AM
githubUrlhttps://github.com/neomjs/neo/issues/8575
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 12, 2026, 3:51 AM

Create Guide: Declarative Config Merging & Structural Injection Pattern

Closed v11.20.0 documentationenhancementai
tobiu
tobiu commented on Jan 12, 2026, 3:45 AM

Create a new comprehensive guide learn/guides/fundamentals/DeclarativeConfigMerging.md explaining the "Structural Injection Pattern" and the native mergeFrom feature.

Topics to cover:

  1. The Problem: Challenges with deep inheritance and configuring nested components (the "prop drilling" equivalent in class-based container hierarchies).
  2. The Solution: Declarative Config Merging using mergeFrom.
  3. Core Concepts:
    • [isDescriptor]: true and merge: 'deep' (and clone: 'deep' for isolation).
    • The mergeFrom symbol.
    • How Neo.container.Base handles recursive injection.
  4. Examples:
    • Basic example: Injecting config into a direct child.
    • Advanced example: Injecting config into a nested child (Structural Injection Pattern).
    • Inheritance example: How subclasses override specific config objects without touching the structure.
  5. Best Practices:
    • Separating Structure (items) from Configuration (myConfig_).
    • Using clone: 'deep' to prevent prototype pollution in shared container definitions.

Integration: Add the new guide to learn/tree.json under "Fundamentals & Core Concepts".

tobiu added the documentation label on Jan 12, 2026, 3:45 AM
tobiu added the enhancement label on Jan 12, 2026, 3:45 AM
tobiu added the ai label on Jan 12, 2026, 3:45 AM
tobiu referenced in commit e1ca4be - "docs: Add guide for Declarative Config Merging & Structural Injection (#8575)" on Jan 12, 2026, 3:48 AM
tobiu assigned to @tobiu on Jan 12, 2026, 3:48 AM
tobiu
tobiu Jan 12, 2026, 3:48 AM

Input from Gemini 3 Pro:

✦ I have created the guide learn/guides/fundamentals/DeclarativeConfigMerging.md.

It covers:

  • The problem of "Configuration Drilling".
  • The solution using mergeFrom and Structural Injection.
  • Core concepts: isDescriptor, merge: 'deep', clone: 'deep'.
  • Code examples for implementation and subclassing.
  • Best practices for avoiding prototype pollution.

The guide is integrated into learn/tree.json.

Closing as completed.

tobiu referenced in commit 13eb383 - "docs: Explain Descriptor Merging in DeclarativeConfigMerging guide (#8575)" on Jan 12, 2026, 3:51 AM
tobiu
tobiu Jan 12, 2026, 3:51 AM

Input from Gemini 3 Pro:

✦ I have updated the DeclarativeConfigMerging.md guide to include a section on Overriding Config Descriptors. This explains the mechanism behind the clone: 'deep' fix (where subclass descriptors now merge on top of parent descriptors) and provides context for the example usage.

Closing as completed.

tobiu closed this issue on Jan 12, 2026, 3:51 AM