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.

Async Computed Values

See original GitHub issue

I’ve been wanting something like vue-async-computed for Vue’s composition API, but couldn’t find anything so I created it myself. I made a gist with an explainer and an initial implementation here.

Because of its generic nature and broad use cases, the useAsyncComputed function may be a nice counterpart to the existing useAsyncState.

What do you think?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
antfucommented, Sep 20, 2020

One drawback though, is that you can’t direct access evaluating in the template then. Might be better to pass it as a ref (or evaluating & evaluatingRef as the same time, not sure)

0reactions
loilocommented, Sep 23, 2020

I’ll give it a try. First contact with Storybook for me, but the other functions should provide enough learning material. 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Async Computed in Components - VueJS? - Stack Overflow
Computed properties are basically functions that cache their results so that they don't have to be calculated every time they are needed.
Read more >
How To Use Asynchronous Computed Properties in Vue.js ...
Computed properties in Vue let you perform complex operations or data formatting while maximizing performance with dependency calculations that ...
Read more >
Async Computed Properties > The Delightful World of Vue
So this is a long way of saying that computed properties can only do synchronous work: they must return a value immediately. If...
Read more >
Async computed properties for Vue.js - GitHub
Just like normal computed properties, async computed properties keep track of their dependencies, and are only recalculated if those dependencies change. But ...
Read more >
vue-async-computed - npm
Async computed properties for Vue. Latest version: 3.9.0, last published: 2 years ago. Start using vue-async-computed in your project by ...
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