                }

                subscriberCache.get(path).add(callback);

                const unsubscribe = context.subscribe(path, (newValue, oldValue, statePath) => {
                    try {
                        callback(newValue, oldValue, statePath);
                    } catch (error) {
                        console.error(`Error in useSubscribe callback for "${path}":`, error);
                    }
                });

                return () => {
                    unsubscribe();
     