getComponent support function return a Promise
See original GitHub issueI 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:
- Created 7 years ago
- Comments:10 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Gotcha; so you’d need https://github.com/airbnb/hypernova/blob/5dbddc4dba65bd9ee2bcbc04fec11713bfa89d57/src/utils/BatchManager.js#L160 changed.
Seems doable/reasonable to me.
@marconi1992 Thanks, It works.