Skip to content

Instantly share code, notes, and snippets.

@thanapongp
Created September 8, 2019 08:17
Show Gist options
  • Select an option

  • Save thanapongp/74bfa011415fe20a761985379b90da5d to your computer and use it in GitHub Desktop.

Select an option

Save thanapongp/74bfa011415fe20a761985379b90da5d to your computer and use it in GitHub Desktop.
app.js with updated constructor
import { htmlToElement } from './utils';
export default class App {
constructor() {
this.input = document.getElementById('input');
this.listRoot = document.getElementById('list-root');
// Clone node and its decendants into class property.
this.emptyState = document.getElementById('empty-state').cloneNode(true);
this.initInput();
}
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment