davestewart / vuex-pathify

Vue / Vuex plugin providing a unified path syntax to Vuex stores
https://davestewart.github.io/vuex-pathify
MIT License
1.37k stars 57 forks source link

Use Payload class with any type of data mutation #140

Open Heziode opened 3 years ago

Heziode commented 3 years ago

This PR attempt to solve the special case raised in #138.

With the use of Payload class in any cases of data / path processed trough vuex-pathify, it become trivial to know (when we make a store.subscribe) if a mutation has been created by pathify.

To sum up:

A deserialization can occur when we sync the store across tabs (with vuex-shared-mutations for example).

Fix #138

Heziode commented 3 years ago

I have not tested this exaustively, it may eventually cause problems, perhaps with the Deep (sub-property)

Heziode commented 3 years ago

@davestewart After tests on one of my website, with traffic (~70K unique visitors per day), it seems, there is no problem with the current implementation given by this PR.

davestewart commented 3 years ago

Thanks for the update!

I'm right at the end of a big project right now, so this isn't going to get any attention right now, but I would like to take a look as soon as I am able.

I'm hoping that might be in a week or two.

That OK?

Heziode commented 3 years ago

Take your time, I working for a year with a copy of your lib inside my project. I can wait 😅