The alerts, newest first; empty until they have loaded
const alerts = usePriceAlerts();
const isWatched = alerts.some(({ id }) => id === productSeriesKey(product));
export function usePriceAlerts(): PriceAlert[] {
const [alerts, setAlerts] = useState<PriceAlert[]>([]);
useEffect(() => watchPriceAlerts(setAlerts).stop, []);
return alerts;
}
The user's price alerts, kept up to date as any page or the background worker changes them.