Subscribe to state changes with optional transformation and filtering.
The subscription will immediately invoke the callback with the current state (if any), then continue to call it whenever the state changes. The map and filter options allow you to transform and selectively receive updates.
Function called with state updates (after map/filter applied)
Optionaloptions: StateOptionsOptional transformations and filters for the subscription
Unsubscribe function - call this to stop receiving updates
Base interface for repositories that provide reactive state subscriptions.
StateRepository is the foundation for all reactive data sources in the platform. Repositories like ConfigRepository, LimeObjectRepository, FilterRepository, etc. extend this interface to provide subscription-based access to their data.
The subscription pattern allows components to react to data changes automatically, ensuring UI stays synchronized with the underlying application state.
Example: RECOMMENDED: Use state decorators for automatic reactive properties
Example: ALTERNATIVE: Manual subscription for custom logic