Cal.com is closing its core codebase, citing AI security risks
twitter.com8 pointsby panphora1 comments
// Using your minimal native DOM library (15 lines)
function TodoApp() {
return r('div', null,
r('h1', null, 'Todo List'),
r('ul', null,
store.todos.map(todo =>
r('li', {
className: todo.done ? 'done' : '',
onClick: () => store.toggleTodo(todo.id)
}, todo.text)
)
),
r('input', {
placeholder: 'Add todo...',
onKeyDown(e) {
if (e.key === 'Enter') {
store.addTodo(this.value)
this.value = ''
}
}
})
)
}
// Full re-render on any change - just replace everything!
store.render = () => document.body.replaceChildren(...TodoApp())
What I love about this:
- Zero build step - no JSX transpilation, no bundler needed
- Direct DOM access - `this.value` just works, no synthetic events
- Brutally simple - the entire "framework" is ~10 lines
[email] [email protected] [twitter] @panphora [bsky] @panphora