-
-
Notifications
You must be signed in to change notification settings - Fork 598
VueJS Reactivity Problem #Vue #Reactive #Observe #699
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you perhaps explain how, why, and what?
Codecov Report
@@ Coverage Diff @@
## master #699 +/- ##
==========================================
- Coverage 89.04% 89.01% -0.04%
==========================================
Files 53 53
Lines 4648 4650 +2
Branches 1072 1072
==========================================
Hits 4139 4139
- Misses 509 511 +2
Continue to review full report at Codecov.
|
Sorry for incomprehensible description of commit. I updated the description. @flovilmart |
Reactivity
This is very dangerous, as:
I am not a big fan of this overall. Can we have this exported as a function instead of a variable? Also, I don’t believe Vue réactivity system is designed to track at once all your objects ever fetched by your client app, but only a selected few that are required to update your component. Let’s say you fetch 500 objects, all those 500 will be tracked, then you move to another component on screen and fetch another 500, and show only those extra 500, now you’re tracking changes in 1000 etc... I am not sure this is the behavior you want. |
Ok. I will refactor code and adding a function which is this issue as soon as. Can you give me a time ? @flovilmart |
This is not what I meant I meant export getState() { return objectState } Also, did you get a chance to read what I mentioned about this solution? Can you provide more elements regarding my concerns? |
Merge pull request #1 from dreadful44/reactivity
@dreadful44 Ping? Pong? |
Sorry. I can't write for a long time. if the code which is my wrote be merge to the master, vue track all object of parse. This is wrong solution. When vue track all object, browser is getting slow. I'm closing merge request. Thank you. |
Vue.js have a reactivity system. This system allows to track object changes.
Why
Vue.js cannot track Parse Objects. Because objects creating out of Vue.js. Because of that reactivity system cannot understand changes.
What
Parse's ObjectsState hashmap is handling objects values. But not creating or editing by Vue.js
How
If Vue.js can set initial value of Parse's ObjectsState hashmap object, Vue's reactivity system can track change. Just add this code block to
main.js
in Vue.jsSo i exported the objectState hashmap, imported in Vue app and has been set the initial value.