HTML first, JS on demand
Resux renders HTML on the server, serializes route and component state, and imports handler modules only after an event is triggered.
Build server-rendered pages that ship HTML first, serialize state, and load client handler code only when users interact.
npx resuxjs@latest init my-app
cd my-app
npm install
npm run dev@latest currently resolves to resuxjs@0.2.23 (checked on 2026-05-07).
<script setup lang="ts">
const count = useState('count', () => 0)
function increment() {
count.value++
}
</script>
<template>
<button @click="increment">
Count: {{ count }}
</button>
</template>The server renders the button as HTML. The browser receives the serialized count state and a small delegated runtime. The handler chunk is loaded only when the button is clicked.