A
A
Artem Prokhorov2021-06-15 12:52:19
Vue.js
Artem Prokhorov, 2021-06-15 12:52:19

Reactive Vuex variable for two or more users, is it possible?

I want to make a variable displaying versioning of table data. Data can change when deleting, changing, creating a record. Accordingly, if some user has done something from the above, v1 will be added to the variable and, accordingly, from 0 it will become one.
And already compare the value of this variable with the old value (which will already be different for each user, since they come in at different times, etc., etc.) and if they are not equal, then I already do a fetch, and if they are equal, then I pull the data from vuex cache so as not to strain the server.
Accordingly, if, for example, 2 or more users are online and have access to the table, and one makes some kind of change, then v + 1 occurs and I want this to change reactively for everyone.
At the same time, it is desirable that this does not depend on the browser (so that when changing the browser, but when entering your acc, the variable v is attached to the user, with the same value as the rest.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stefan, 2021-06-15
@kotcich

Read about websocket, I think you meant it, but you are unlikely to be prompted with the implementation here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question