# BaseNative — start here Templates are HTML. State is `signal`, `computed`, and `effect`. Server HTML comes from `render()`. The browser attaches behavior with `hydrate()`. There is no JSX, no build step, and no `eval` or `new Function`. Read this file before writing UI. The long index is `llms.txt`. The honest scorecard of what BaseNative is bad at is `/ai`. ## Install `@basenative/*` is on npmjs.org. No token and no `.npmrc`. ```bash npm install @basenative/runtime @basenative/server ``` One HTML file, no install, no bundler. StackBlitz and WebContainers can open this file alone: ```html ``` A full copy-paste page is `examples/cdn/index.html`. ## Counter ```html

{{ count() }} doubled {{ doubled() }}

``` ```js import { signal, computed, effect, hydrate } from '@basenative/runtime'; const count = signal(0); const doubled = computed(() => count() * 2); // Runs once per set, with both values already settled. effect(() => console.log(count(), doubled())); hydrate(document.body, { count, doubled }); ``` Server render takes the same template string: ```js import { render } from '@basenative/server'; render('

{{ count() }}

', { count }); ``` ## Syntax | Write this | Means | |---|---| | `{{ count() }}` | Text. Call the signal. | | `:class="done() ? 'done' : ''"` | Attribute binding. | | `@click="save($event)"` | Event. The handler expression runs on the event. | | `` | Conditional. On `