Skip to content

Commit

Permalink
Remove duplicated logic in vanilla example
Browse files Browse the repository at this point in the history
  • Loading branch information
curran authored Sep 16, 2022
1 parent 23a51c6 commit 53e1234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/create-vite/template-vanilla/counter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ export function setupCounter(element) {
counter = count
element.innerHTML = `count is ${counter}`
}
element.addEventListener('click', () => setCounter(++counter))
element.addEventListener('click', () => setCounter(counter + 1))
setCounter(0)
}

0 comments on commit 53e1234

Please sign in to comment.