Askr · TypeScript application framework

TypeScript apps.
Explicit by design.

Build interfaces with function components and explicit state. Connect routes, data, and server code as your application grows.

Create an application
npx @askrjs/cli@latest create startkit my-app

Open source. Apache 2.0. Built with TypeScript.

State and routes, in one fileapp.tsx
import { state } from '@askrjs/askr';
import { createSPA } from '@askrjs/askr/boot';
import { createRouteRegistry, route } from '@askrjs/askr/router';

function Counter() {
  const [count, setCount] = state(0);
  return (
    <button onClick={() => setCount((value) => value + 1)}>
      Count: {count()}
    </button>
  );
}

const registry = createRouteRegistry(() => route('/', Counter));
await createSPA({ root: '#app', registry });

Read the current value, update it on click, and register the page.