TSone

TSone

A lightweight, pure TypeScript frontend framework with reactivity, components, and routing.

Features

  • Built with pure TypeScript and complete type support
  • An efficient reactivity system
  • A component-based development model
  • Built-in routing
  • A style management system
  • A lightweight design with no external dependencies
  • A Bun-native toolchain: package management, testing, building, and documentation are all powered by Bun

Quick Start

Install @geektech/tsone with Bun:

bun add @geektech/tsone
import { Component, VNode, createApp } from '@geektech/tsone';

class App extends Component<object, { count: number }> {
  protected initState(): { count: number } {
    return { count: 0 };
  }

  protected initStyles(): void {}

  protected render(): VNode {
    return {
      tag: 'button',
      listeners: {
        click: () => this.state.count++,
      },
      children: ['Count: '],
    };
  }
}

createApp({ root: App }).mount();

Continue with Getting Started, Core Concepts, or go straight to the App API.