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.

getComponent support function return a Promise

See original GitHub issue

I am working on vue bindings for Hypernova, but vue-server-renderer renderer pass html by callback:

const Vue = require('vue')
 
const renderer = require('vue-server-renderer').createRenderer()
 
const vm = new Vue({
  render (h) {
    return h('div', 'hello')
  }
})

renderer.renderToString(vm, (err, html) => {
  console.log(html) // -> <div server-rendered="true">hello</div> 
})

So, I’d like getComponent support a function which return a Promise, just like props => Promise.resole(html).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
ljharbcommented, Feb 27, 2017
0reactions
baoticommented, Feb 27, 2019

@marconi1992 Thanks, It works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GetComponent function returning null - Stack Overflow
The problem is, that GetComponent<Button>() is returning null , meaning it's not finding the button component in the object.
Read more >
Scripting API: GameObject.GetComponent - Unity - Manual
Using gameObject.GetComponent will return the first component that is found and the order is undefined. If you expect there to be more than...
Read more >
Executing Promises in a React Component - Pluralsight
I am using the async/await syntax to handle the promise that fetch returns, as well as the promise returned by calling json() on...
Read more >
get return value of $emit event's callback #5443 - vuejs/vue
The first try the value is returned properly. I can't find out how to return the promise after attaching it to the 'tokenRefreshed'...
Read more >
jQuery Promises and Deferred Objects
Promises and deferred objects are used to manage callbacks from AJAX. As these requests are asynchronous, promises enable the site to ...
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