If you want to stick to using stores (stores have some advantages), then you are looking for subscribe()
onMount(() => {
notify.subscribe((notify) => {
if (notify) {
// do something
}
})
);
Remember to unsubscribe when the component gets destroyed.