Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Payload class with any type of data mutation #140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Heziode
Copy link
Contributor

@Heziode Heziode commented Aug 10, 2021

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:

  • if it's a POJO, it would have been deserialized
  • if it's a Payload, it would have been created internally by Pathify

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

Fix #138

@Heziode
Copy link
Contributor Author

Heziode commented Aug 10, 2021

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

@Heziode
Copy link
Contributor Author

Heziode commented Sep 4, 2021

@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
Copy link
Owner

davestewart commented Sep 5, 2021

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
Copy link
Contributor Author

Heziode commented Sep 5, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

collision between object path and serialization
2 participants