Vue - like recursive tracking?
See original GitHub issuecase - extenally controlled state object.
like:
var state = {
name: 'Age',
items: [ { name: 'Pet' }, { name : 'Book' } , { name: { firstName: 'foo' } } ]
}
recursive tracking example - https://gist.github.com/lifeart/d6237e0129e603b23d1aa8e8d4b07504
like makeTracked(state);
also, it’s possible to add one more object tracking option - track only defined properties (without proxy), patching native getters/setters.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Vue recursive components: Rendering nested comments
Explore how you can use recursive components in Vue to manage tree-like structured data with an example comments section.
Read more >Communicating Between Recursive Components in Vue.js
Communication in-between recursive components goes across many levels. Learn how to cope with that in your Vue apps.
Read more >Vuejs: Dynamic Recursive components - Stack Overflow
Worked for me when I removed components key and called it with its name. here is a running example in code sandbox and...
Read more >How to track down a recursive update issue - Vue Forum
Suddenly noticed a “Maximum recursive updates exceeded” error, not sure when this got introduced. It happens when the component loads, ...
Read more >Comment threads with recursive components in Vue 3
It's common for applications to use threaded comment replies for managing communication. In Vue, we can use recursion to help manage ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think
TrackedObject
should not alter the original object, to match the APIs of the other classes. Dynamically tracking values on a existing object may belong in a separate utility, could be useful, but it’s also definitely powerful, could have some consequences we should think through.So I think the first step is actually to do that second part, enable
TrackedObject
when proxies are disabled and manually install getters/setters for the properties passed to its constructor. I’ll try to do it soon, if you have a chance though PRs are welcome 😄