Is your feature request related to a problem? Please describe.
The current getCount() method on Neo.collection.Base is not reactive. This means that components or other parts of the application cannot directly observe changes in the collection's size using Neo.mjs's reactive binding system. This limits the ability to easily update UI elements that depend on the number of items in a collection without manual event handling.
Describe the solution you'd like
Add a reactive count_ config to Neo.collection.Base. This config should automatically update whenever items are added to or removed from the collection (e.g., via add, remove, splice methods). The afterSetCount hook should be triggered when the count changes.
Describe alternatives you've considered
Currently, developers need to listen to the mutate event on the collection and manually update any dependent properties or UI elements. This adds boilerplate and complexity.
Additional context
This enhancement would align Neo.collection.Base more closely with the reactive nature of other Neo.mjs components and improve integration with Neo.state.Provider for future enhancements (though direct binding via stores.myStoreName.count would still require a separate Neo.state.Provider enhancement).
Is your feature request related to a problem? Please describe. The current
getCount()method onNeo.collection.Baseis not reactive. This means that components or other parts of the application cannot directly observe changes in the collection's size using Neo.mjs's reactive binding system. This limits the ability to easily update UI elements that depend on the number of items in a collection without manual event handling.Describe the solution you'd like Add a reactive
count_config toNeo.collection.Base. This config should automatically update whenever items are added to or removed from the collection (e.g., viaadd,remove,splicemethods). TheafterSetCounthook should be triggered when the count changes.Describe alternatives you've considered Currently, developers need to listen to the
mutateevent on the collection and manually update any dependent properties or UI elements. This adds boilerplate and complexity.Additional context This enhancement would align
Neo.collection.Basemore closely with the reactive nature of other Neo.mjs components and improve integration withNeo.state.Providerfor future enhancements (though direct binding viastores.myStoreName.countwould still require a separateNeo.state.Providerenhancement).