'Is it possible to use $subscribe or watch inside the store itself?

I want to watch the store and make a new api call (use store action) each time when a part of the store changes. How can I implement this watcher inside the (defineStore()) store itself ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source