Skip to content

Blaze-NGReactive Templating, Rewritten in TypeScript

A modern, zero-dependency rewrite of Meteor Blaze โ€” faster, smaller, fully typed.

Quick Example โ€‹

Here's what Blaze-NG looks like in action:

handlebars
<template name='counter'>
  <div class='counter'>
    <h2>Count: {{count}}</h2>
    <button class='increment'>+1</button>
    <button class='decrement'>-1</button>
    <button class='reset'>Reset</button>
  </div>
</template>
ts
import { Template } from '@blaze-ng/core';

Template.counter.onCreated(function () {
  this.count = new ReactiveVar(0);
});

Template.counter.helpers({
  count() {
    return Template.instance().count.get();
  },
});

Template.counter.events({
  'click .increment'(event, instance) {
    instance.count.set(instance.count.get() + 1);
  },
  'click .decrement'(event, instance) {
    instance.count.set(instance.count.get() - 1);
  },
  'click .reset'(event, instance) {
    instance.count.set(0);
  },
});

Comparison โ€‹

FeatureOriginal BlazeBlaze-NG
LanguageJavaScript (ES5)TypeScript (strict)
DependenciesjQuery + lodash + uglify-jsZero
Bundle size~25KB gzip29 KB gzip (core runtime)
DOM manipulationjQuery wrappersNative APIs
ReactivityTracker onlyAny reactive system
Module formatMeteor packagesESM + CJS
TestingTinytestVitest (490 tests)
SSRLimitedFull support
WASM accelerationNoneOptional

Performance at a Glance โ€‹

Real numbers from the benchmark suite:

CategoryHighlightops/sec
First RenderStatic div โ†’ DOM10,151
Reactive UpdateSingle text change10,220
Batched Updates100 updates, 1 flush12,022
AttributeStyle property update11,714
ListCreate 100 rows660
LifecycleCreate + destroy cycle10,001
CompilationSimple template โ†’ JS117,950
DiffShuffle 100 items129,568

Run benchmarks yourself:

bash
pnpm bench:run      # Full benchmark suite (34 suites)
pnpm bench:compare  # Old vs New head-to-head comparison
pnpm bundle-size    # Bundle size analysis

See the full Performance & Benchmarks page for all results, including head-to-head comparisons with original Blaze.

Released under the MIT License.