mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-02-26 09:18:57 +00:00
feat: added Vite examples
This PR includes Vite examples, in particular: Vite: Vanilla Javascript Vite: Vanilla Tyescript Also updated the general readme to reflect the addition.
This commit is contained in:
9
vite/vanilla-js/counter.js
Normal file
9
vite/vanilla-js/counter.js
Normal file
@@ -0,0 +1,9 @@
|
||||
export function setupCounter(element) {
|
||||
let counter = 0
|
||||
const setCounter = (count) => {
|
||||
counter = count
|
||||
element.innerHTML = `count is ${counter}`
|
||||
}
|
||||
element.addEventListener('click', () => setCounter(counter + 1))
|
||||
setCounter(0)
|
||||
}
|
||||
Reference in New Issue
Block a user