tune
This commit is contained in:
+2
@@ -107,6 +107,7 @@
|
||||
<ol>
|
||||
<li><strong>Parent ConnectionId Passing</strong>: Child hubs copy parent's function references via connectionId</li>
|
||||
<li><strong>Frontend ConnectionId Chain</strong>: Components pass connectionId down the hierarchy</li>
|
||||
<li><strong>Wrapper Function Pattern</strong>: Child hubs should create wrapper functions that dynamically retrieve and invoke parent functions at runtime, rather than directly copying references. This ensures type safety through runtime checking and supports dynamic function updates from the parent.</li>
|
||||
</ol>
|
||||
<h2 id="benefits">Benefits</h2>
|
||||
<ul>
|
||||
@@ -119,6 +120,7 @@
|
||||
<ul>
|
||||
<li>Apply or inherit from DictionaryHub for auto-cleanup</li>
|
||||
<li>Use meaningful key names (e.g., “transformer-getter”)</li>
|
||||
<li>Always setup dictionary functions unconditionally during initialization - put condition checks inside the functions, not around the setup. This ensures child panels can access functions even when parent objects temporarily don't meet the conditions.</li>
|
||||
</ul>
|
||||
<h2 id="common-pitfalls">Common Pitfalls</h2>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user