Created
May 28, 2018 19:29
-
-
Save kyuwoo-choi/b00b1117a8a7d4b0251c465d33d215e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { render } from '../../node_modules/lit-html/lib/lit-extended'; | |
export default base => | |
class extends base { | |
render() {} | |
async invalidate(instant) { | |
if (!this.needsRender) { | |
if (!instant) { | |
this.needsRender = true; | |
await 0; | |
this.needsRender = false; | |
} | |
render(this.render(), this.shadowRoot); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment