push({ data }) {
      const list = document.querySelector('.todo-list')
      const todo = getTodoItemDom(data)
      list.insertBefore(todo, list.firstChild)
      document.querySelector('.new-todo').value = ''
    }
// Triggered when a new item is pushed
Triggered when a new item is pushed
Triggered when a new item is pushed
push({ data }) {
      const list = document.querySelector('.todo-list')
      const todo = getTodoItemDom(data)
      list.insertBefore(todo, list.firstChild)
      document.querySelector('.new-todo').value = ''
    }
push ( { data } ) { const list = document . querySelector ( '.todo-list' ) const todo = getTodoItemDom ( data ) list . insertBefore ( todo , list . firstChild ) document . querySelector ( '.new-todo' ) . value = '' }
Triggered when a new item is pushed
Triggered when a new item is pushed