79529831

Date: 2025-03-23 23:01:17
Score: 0.5
Natty:
Report link

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.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Skk