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

fix(traverse): Prevent traversing Vue instances #10379

Closed

Conversation

SergioCrisostomo
Copy link

@SergioCrisostomo SergioCrisostomo commented Aug 12, 2019

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

This fixes a bug first discovered in Vuex where storing Vue instances in the Store generates a RangeError: Maximum call stack size exceeded.

Related: vuejs/vuex#1587

If there is another approach for this I'm happy to go that road and suggest an alternative fix or documentation improvement..

@posva
Copy link
Member

posva commented Aug 12, 2019

I would discourage you from storing Vue instances in the store. It's better for the store to be fully serializable. I think we have already discussed this but couldn't find the discussion in vue repository.

@SergioCrisostomo
Copy link
Author

@posva I thought also this should be named in the docs somewhere. So if this PR leads to that new "good practise rule" I am happy also. It should be clear so developers know if its something we can use or not.

@posva
Copy link
Member

posva commented Aug 12, 2019

Yeah, I understand, I read the issue you posted on Vuex
It is stated in Vue.js Docs: https://vuejs.org/v2/api/#data

The Vuex state property follow the same reactivity rules as Vue data

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.

2 participants