question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vue - like recursive tracking?

See original GitHub issue

case - 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:closed
  • Created 4 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pzuraqcommented, Oct 4, 2019

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.

1reaction
pzuraqcommented, Oct 3, 2019

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 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found