Issue with html.resolve "update is not a function"
Closed this issue · 2 comments
khrome commented
Hey there, I'm just starting to use resolve and I'm hitting issues
const Header = {
font: property(''),
text: property(''),
renderedText: ({ text }) => {
return text;
},
render: ({ renderedText }) => {
var promise = new Promise((resolve, reject) => {
setTimeout(function(){
resolve('This is an async thing')
}, 500)
})
html`
<span>${html.resolve(
promise
.then((value) => html`<div>${value}</div>`)
.catch(() => html`<div>Error!</div>`),
html`Loading...`,
)}</span>
`},
};
define('just-a-header', Header);
I'm sure it's my own user error, but it's unclear what the issue is.
Full harness here: https://gist.github.com/khrome/64a7027121b2608b2675aa4a908d457f
smalluban commented
Can I help here? :)
khrome commented
nope, figured out I was missing an explicit return :D Thanks though! and thanks for all the work on the library.