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

How to avoid vuex over reactivity? #1629

Closed
RDMStreet opened this issue Oct 11, 2019 · 1 comment

Comments

@RDMStreet
Copy link

@RDMStreet RDMStreet commented Oct 11, 2019

What problem does this feature solve?

If the getter returns an object or an array, this causes a recalculation of the properties that depend on this getter, even if the data in the object that returned the getter did not change. Can I somehow return the result of a previous getter calculation if the data has not really changed?

What does the proposed API look like?

someGetter(state, getters, rootState, rootGetters, oldValue) { ... if (JSON.stringify(result) === JSON.stringify(oldValue)) return oldValue; return result; }

@ktsn

This comment has been minimized.

Copy link
Member

@ktsn ktsn commented Nov 9, 2019

For usage questions, please use the following resources:

  • Ask on the forums
  • Ask on the chat
  • Look for / ask questions on Stack Overflow
@ktsn ktsn closed this Nov 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.