Volver al ranking

nanojsx/nano

TypeScriptnanojsx.io

🎯 SSR first, lightweight 1kB JSX library.

jsxssrdenonodeisomorphicnano
Crecimiento de estrellas
Estrellas
1.6k
Forks
39
Crecimiento semanal
Issues
7
5001k1.5k
jun 2020jun 2022jul 2024jul 2026
Artefactosnpmnpm install nano
README

Nano JSX Logo

SSR first, lightweight 1kB JSX library.

Written in TypeScript.
Works on Node and Deno.
Designed to build ultra fast MPAs and SPAs.




gzip size GitHub Workflow Status GitHub last commit Sponsors code style: prettier Codecov Node version Join our discord server!


News

nano-jsx is now at v0.2.x 🎉
This means, no breaking changes till v0.3.x
Tweet about it!

Changes in v0.2.0

  • Breaking Change: Fix Shadow DOM DIV wrapping. #146 (@hbroer)
  • Breaking Change: Improve Router Listener. #115
  • Added Bun.js support. #151 (@lanten)
  • Added renderComponentGetReference function. cbe51e3

Getting Started

Video Tutorial

Features

The best about Nano JSX is the small bundle size. It builds, although is sound crazy, bundles as small as svelte!

More Features

  • SSR
    Out of the box, very simple to use

  • Pre-Rendering
    Renders your app to static html if you want.
    (This is possible, but requires some knowledge.
    I plan to make a tutorial soon.)

  • Partial Hydration
    Hydrate and only the parts you really need

  • Isomorphic Router
    Works on Client- and Server-Side

  • CSS in JS
    Use JavaScript objects for styling

  • No JSX build tools required
    Uses Tagged Templates instead of JSX if you prefer

  • Props, Ref, Context and Events
    Use Props, Ref, Context API and Events as you are used to in react

  • Inline SVG
    No problem

  • Prefetch
    Use the built-in Link Component

  • 1KB (gzip)
    All of this in only ~1KB
    (Well, the core module is only about ~1KB)

  • CustomElements mode
    You can define your component written with Nano JSX as web-components with defineAsCustomElements. This enables you to develop very light web components. (thanks @Shinyaigeek)

Documentation

Checkout the website to find out more!


Development Section

Run browser tests (visually)

# install dependencies
npm install

# build
npm run build

# bundle
npm run bundle

# create instrumented bundle
npx webpack -c webpack/webpack.bundle.instrumented.js

# transpile browserTest library
npx tsc -p scripts/browserTest/tsconfig.json

# open browser to run the tests
npx five-server . --open=test/browser
Repositorios relacionados
oven-sh/bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

Rustcrates.ioOtherbunbundler
bun.com
95k4.9k
prettier/prettier

Prettier is an opinionated code formatter.

JavaScriptnpmMIT Licenseformatterprinter
prettier.io
52.1k4.9k
evanw/esbuild

An extremely fast bundler for the web

GoGo ModulesMIT Licensetypescriptminifier
esbuild.github.io
40k1.3k
preactjs/preact

⚛️ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.

JavaScriptnpmMIT Licensepreactjsx
preactjs.com
38.8k2k
solidjs/solid

A declarative, efficient, and flexible JavaScript library for building user interfaces.

TypeScriptnpmMIT Licensejavascriptperformance
solidjs.com
35.8k1.1k
yewstack/yew

Rust / Wasm framework for creating reliable and efficient web applications

Rustcrates.ioApache License 2.0rustweb
yew.rs
32.7k1.5k
biomejs/biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.

Rustcrates.ioApache License 2.0cssformatter
biomejs.dev
25.3k1.1k
mdx-js/mdx

Markdown for the component era

JavaScriptnpmMIT Licensemdxmarkdown
mdxjs.com
19.7k1.2k
infernojs/inferno

:fire: An extremely fast, React-like JavaScript library for building modern user interfaces

JavaScriptnpmMIT Licenseinfernovdom
infernojs.org
16.4k640
BuilderIO/mitosis

Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.

TypeScriptnpmMIT Licensejsxreact
mitosis.builder.io
13.9k634
vercel/satori

Enlightened library to convert HTML and CSS to SVG

TypeScriptnpmMozilla Public License 2.0image-generatorjsx
og-playground.vercel.app
13.7k356
Tencent/omi

Web Components Framework - Web组件框架

TypeScriptnpmOtheromijsx
omi.cdn-go.cn
13.3k1.3k