Since I do not have a lot of experience in web development, I was wondering if this is a pattern or anti-pattern in Vue2.
- Have a variable "callId" in Vuex store. By default it is empty.
- When a call has arrived, set variable callId to the newly arrived call's id.
- Any Vue Component interested in this event can map this variable from state and watch it -> when it changes to non empty value, it means there's a new call
This way events could be simulated via Vuex. I thought of using event bus, but I've been told it is not recommended.