Git Product home page Git Product logo

Comments (2)

foxbenjaminfox avatar foxbenjaminfox commented on August 30, 2024

I can't quite tell what's going on in your example: for one thing, where is the deeply nested object access that is causing the problem?

The way asyncComputed works behind the scenes is using Vue's normal computed mechanism: the function for computing an asyncComputed property is used internally as a normal computed function (one whose return value is a Promise, of course.) What this means is that the function is re-run and the result recalculated exactly in the same circumstances as it would be if it were a function for computing a normal Vue computed property.

Could you perhaps put together a codepen or the like to show this issue in action? A simple example of an async computed property (with a deeply nested object) that isn't being properly updated, that is. If I could see a simple example of this in action, I will be able to figure out to what extent this is a real bug.

from vue-async-computed.

hybridwebdev avatar hybridwebdev commented on August 30, 2024

It seems I may have jumped the gun on opening this ticket. According to my tests, it does indeed work as expected in an isolated environment: https://codesandbox.io/s/crazy-feather-qkv1c?file=/src/App.vue

That's a loose simulation of what i'm doing. However, my actual implementation is slightly different and too complex/private to dive into on here.

I had theorized after looking at your code, that my issue may have been because I was using a renderless wrapper component, and this was somehow not playing well with the should/update hooks. However, after testing I believe the side-effect may be a result of my actual live implementation of it.

I'll do some more diving into my own code and see if I can pinpoint exactly what my issue is.

EDIT

So yes, it appears after a deep dive into my code, that the problem lies on my end. Going to go ahead and close this ticket.

Thanks again for such a great plugin, and for replying 👍

from vue-async-computed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.