Subscribe to store changes (route, state, error) Returns an unsubscribe function
Function called when route, state, or error changes
Unsubscribe function
const unsubscribe = subscribeToStore((type, value) => { if (type === 'route') console.log('Route changed:', value);});// Later...unsubscribe(); Copy
const unsubscribe = subscribeToStore((type, value) => { if (type === 'route') console.log('Route changed:', value);});// Later...unsubscribe();
Subscribe to store changes (route, state, error) Returns an unsubscribe function