Askr Documentation
Build browser, server, static, and full-stack TypeScript applications with the current published Askr packages.
Example
import { state } from '@askrjs/askr';
import { createSPA } from '@askrjs/askr/boot';
import { createRouteRegistry, route } from '@askrjs/askr/router';
function HomePage() {
const [count, setCount] = state(0);
return <button onClick={() => setCount((value) => value + 1)}>Count: {count()}</button>;
}
export const pageRegistry = createRouteRegistry(() => route('/', HomePage));
await createSPA({ root: '#app', registry: pageRegistry });Choose a path
New to Askr? Follow Getting Started to create an application, then read Core Concepts to learn how components, state, and lifecycle work fit together. For an existing project, use the section navigation or search to find a guide, component, or API.
Published package set
The core package, @askrjs/askr, provides components, state, routing, and rendering. Add @askrjs/ui for headless controls, @askrjs/themes for styled components, and @askrjs/server for HTTP applications. Install the packages your application uses. The API reference lists their published entrypoints and signatures.
Application modes
Use a single-page application for browser-rendered interfaces, server rendering for request-time HTML, or static generation for pages you can build ahead of time. Each mode has its own startup and build configuration. Start with application modes to choose a template for your project.
Upgrade guidance
Start from the installed package set
Before changing dependencies
This documentation is checked against the package set installed by its lockfile. Compare the relevant API pages with your application before changing dependencies.
Review and validate the proposed set
For every update
Run askr outdated first, use askr update for range-safe changes, and reserve askr upgrade for deliberately accepting breaking 0.x movement. Install, test, and build before committing the result.