Skip to content

Instantly share code, notes, and snippets.

@kyuwoo-choi
Created May 28, 2018 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyuwoo-choi/b00b1117a8a7d4b0251c465d33d215e0 to your computer and use it in GitHub Desktop.
Save kyuwoo-choi/b00b1117a8a7d4b0251c465d33d215e0 to your computer and use it in GitHub Desktop.
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