Description
The Neo.state.createHierarchicalDataProxy has been enhanced to directly expose Neo.data.Store instances via the data.stores path. This allows developers to bind directly to properties of stores (e.g., data.stores.myStore.count) within bind configurations and formulas without needing intermediate data properties or listeners.
Changes Made
- Modified
src/state/createHierarchicalDataProxy.mjs to include special handling for the stores property in the get trap.
- When
data.stores is accessed, a new proxy is returned that delegates to Neo.state.Provider.getStore() for hierarchical resolution of store instances.
- This enables
Neo.core.Effect to directly track changes to reactive configs (like count) on the returned Neo.data.Store instances.
Verification
Verified that the example in learn/guides/datahandling/StateProviders.md now correctly binds directly to data.stores.mySharedStore.count and updates reactively when the store's count changes.
Description
The
Neo.state.createHierarchicalDataProxyhas been enhanced to directly exposeNeo.data.Storeinstances via thedata.storespath. This allows developers to bind directly to properties of stores (e.g.,data.stores.myStore.count) withinbindconfigurations andformulaswithout needing intermediate data properties or listeners.Changes Made
src/state/createHierarchicalDataProxy.mjsto include special handling for thestoresproperty in thegettrap.data.storesis accessed, a new proxy is returned that delegates toNeo.state.Provider.getStore()for hierarchical resolution of store instances.Neo.core.Effectto directly track changes to reactive configs (likecount) on the returnedNeo.data.Storeinstances.Verification
Verified that the example in
learn/guides/datahandling/StateProviders.mdnow correctly binds directly todata.stores.mySharedStore.countand updates reactively when the store's count changes.