Axiom Framework

0.9.1 · active · verified Tue Apr 21

Axiom is a modern web framework featuring a unique two-phase rendering architecture, emphasizing high performance through in-memory calculations and zero direct DOM reads. It leverages a reactive programming model, likely based on signals, to manage UI updates efficiently. Currently at version 0.9.1, the framework appears to be under rapid development, with frequent releases focusing on new features like declarative routing, server-side rendering (`renderToString`), portals, reactive context, and form modules, as well as bug fixes and performance improvements. Its core differentiators include its rendering strategy, aiming to eliminate DOM reads for re-renders, and its TypeScript-first approach, providing strong type safety for developers.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates creating a basic reactive counter component using Axiom's `App` and `signal` primitives, then rendering it to the DOM.

import { App, render, signal } from 'axiom-framework';

interface CounterProps {
  initialCount: number;
}

function Counter({ initialCount }: CounterProps) {
  const count = signal(initialCount);

  const increment = () => {
    count.value++;
  };

  const decrement = () => {
    count.value--;
  };

  return App`
    <div>
      <h1>Count: ${count}</h1>
      <button onclick=${increment}>Increment</button>
      <button onclick=${decrement}>Decrement</button>
    </div>
  `;
}

// Render the Counter component into the DOM
render(document.getElementById('app')!, Counter, { initialCount: 0 });

// Example of accessing a signal's value later
// setTimeout(() => console.log('Current count:', count.value), 2000);

view raw JSON →