Comments (2)
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.
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)
- Typescript / vue-async-computed Property 'foo' does not exist on type 'CombinedVueInstance<Vue, {...} HOT 2
- Initial State of Async Call 'updating' set to true when using shouldUpdate()
- Vue 3 support? HOT 5
- Add support to installation as mixin.
- Make Promise as return of method update() or new method updatePromise()
- Provide option to exclude or explicitly list watched properties
- Value getting computed on route changes
- kjidjvtlcdgjj
- Use with Nuxt? HOT 1
- Provide cancel method
- implement set like get
- "this.$options is undefined" is being raised when using vue async computed
- "lazy: true" fails to stop updates HOT 1
- TypeScript support in 3.8.0 HOT 4
- Add vue-async-computed-decorator to README.md HOT 2
- Issue updating reactive variables in asyncComputed HOT 1
- asyncComputed return only default value HOT 2
- how to use this plugin with class based vue components? HOT 2
- Executed without being called, normal computed works different HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-async-computed.