WildflowerJS Reactive JS, No BS*

A no-build reactive JavaScript framework, rooted in the web platform.
No build step. No dependencies. No lock-in.

<script src="wildflower.min.js"></script> ...and start building.

Back to Basics

The code you write is 100% web standard code. HTML stays HTML. JavaScript stays JavaScript. CSS stays CSS. No JSX, no templating language, no custom syntax to learn. If you know the web platform, you already know how to use this.

WildflowerJS extends the web platform. It doesn't replace it.

Your Development Simplified

Because you develop with 100% web standards, every tool in your existing chain already understands the code: IDE, browser DevTools, linter, formatter, screen reader, SEO crawler. Nothing to install, no custom file types, no sourcemaps. Save the file, refresh, and your change is live.

Just be a web developer.

Batteries Included: One Mental Model

Router, SSR, stores, computed properties, two-way binding, event modifiers, data pools, and TypeScript types, all built in, all speaking the same language. Learn data-bind once and you know binding everywhere: lists, pools, stores, forms. There's no five-library stack to keep in sync.

One script tag. Everything you need.

<div data-component="counter">
  <span data-bind="count"></span>
  <button data-action="increment">
    +1
  </button>
</div>

<script>
wildflower.component('counter', {
  state: { count: 0 },
  increment() { this.count++ }
})
</script>

How It Works

data-bind connects state to the DOM.

data-action connects events to methods.

this.count++ triggers a precise DOM update.

Mutate state. The DOM updates.

Two Reactivity Modes

data-list for automatic reactivity: mutate state, DOM updates. data-pool for explicit control: plain objects, zero proxy overhead, you say what changed.

Same template syntax. Different performance profile. From interactive forms to per-frame particle systems. You choose the right tradeoff for the job.

Try it. Right-click, inspect this demo. Every dot is a real DOM element.

See full demo →

* Build Step

Zero Toolchain

Modern frameworks ask you to install a compiler, a bundler, a package manager, hundreds of fragile transitive dependencies, and a framework-specific file format, before you write a single line of your application.

WildflowerJS was built starting from a single principle: no build step, no tooling. Ever.

WildflowerJS asks you to add a script tag.

There's no CLI scaffolding step, no config files, no .vue/.jsx/.svelte source format. You don't debug through sourcemaps or wait on a build pipeline. Your project has zero dependencies.

Performance isn't a tradeoff. Build steps optimize bundle delivery, not the runtime work that follows it. WildflowerJS writes directly to the DOM, with no virtual DOM or reconciliation pass between state change and update, so it doesn't need a build step to be fast.

The framework is full-featured without the toolchain: router, SSR, stores, computed properties, transitions, pools. You don't need a toolchain to use any of it.

my-app/
  index.html
  app.js
  style.css
  wildflower.min.js

That's the entire project. No package.json.
No node_modules. No config files. Ship it.

Zero Install. Zero Attack Surface.

Every dependency you install is trust extended to a maintainer you've never met, running scripts on your dev machine and in your CI. A typical React + Vite + UI‑lib setup pulls in 300+ transitive packages before you write a feature.

Each one is a potential intrusion vector. NPM worms, OAuth chains compromising deploy platforms, postinstall hijacking: the supply chain is now where production code gets compromised, not the deploy. And signing isn't a backstop: Mini Shai‑Hulud (May 2026) compromised 170+ packages whose malicious versions carried valid SLSA Build Level 3 provenance, because the attestation came from build infrastructure the worm had already taken over.

WildflowerJS users don't have this attack surface, by construction. There is no npm install, no postinstall script, no transitive package graph. The framework is one file you copy or pin by hash.

As of v1.1, the same holds for building the framework itself. WildflowerJS bundles with a vendored rollup and terser pipeline pulled as three SHA‑512‑pinned tarballs: no npm install, no transitive packages, no postinstall scripts in the build path. The entire toolchain is three files you verify by hash.

Zero dependencies is the absence of a problem the rest of the industry has not properly addressed.

A typical React/Vue project:

  npm install
  ├── hundreds of packages
  ├── from hundreds of maintainers
  ├── postinstall scripts run on install
  └── tens to hundreds of MB of transitive code

WildflowerJS:

  <script src="wildflower.min.js"></script>
  └── 1 file.
      No transitive dependencies.

Zero Lock-in

WildflowerJS works with the DOM, not instead of it. There's no virtual DOM intercepting your code and no compiler rewriting your markup. The render cycle is yours.

That means Leaflet, DataTables, Chart.js, D3, Three.js, any library that touches the DOM, just works. No wrapper packages or framework-specific escape hatches required. Drop in a script tag and use it.

Because your code is standard HTML and JavaScript, you're never locked in. Your skills transfer and your code is more portable. If you outgrow the framework, your knowledge doesn't expire.

This also means your "ecosystem" is all of the world of vanilla JS. Without compromises or hacks.

<!-- Use any library directly -->
<div data-component="map-view">
  <div id="map" style="height: 400px"></div>
</div>
wildflower.component('map-view', {
  state: { lat: 51.505, lng: -0.09 },
  init() {
    // Leaflet works as-is. No wrappers.
    this._map = L.map('map')
      .setView([this.lat, this.lng], 13);
    L.tileLayer('https://{s}.tile.osm.org'
      + '/{z}/{x}/{y}.png').addTo(this._map);
  }
})

Precise Reactivity

When you write this.count++, WildflowerJS updates the single DOM node bound to count. Nothing else is touched. There's no tree diffing or reconciliation pass to figure that out.

This isn't a tradeoff. You get fine-grained updates and a simple mental model. Change a property, the bound element updates. That's the entire reactivity model.

Other frameworks ask you to learn signals, accessors, memos, effects, and subscription lifecycles to achieve what WildflowerJS does with a property assignment.

wildflower.component('dashboard', {
  state: {
    users: 1420,
    status: 'healthy'
  },
  computed: {
    summary() {
      return this.users + ' users, ' + this.status;
    }
  },
  refresh() {
    this.users = 1421;
    // Only the elements bound to 'users'
    // and 'summary' update. Everything
    // else on the page is untouched.
  }
})

One Reactivity Model. Everywhere.

Components, Stores, and Plugins all share the same reactive foundation. State, computed properties, and methods work identically no matter where they live. Learn it once, it works the same way in a UI component, a global store, or a framework plugin.

Other frameworks make you learn a different system for each layer. React components use hooks, but stores need Redux or Zustand, which are completely different APIs. Vue components use reactive data, but Pinia stores have their own patterns. Every layer is a new mental model.

In WildflowerJS, there's one model. A store is a component without a template. A plugin is an entity that extends the framework itself, adding directives, lifecycle hooks, and services. The same this.count++ triggers the same reactivity everywhere.

This unlocks patterns other frameworks can't express. A store can run headless physics simulations with tick(), feeding data into a component that renders it through a pool, all using the same reactive primitives, no glue code required.

// Component: reactive UI
wildflower.component('cart', {
  state: { items: [] },
  computed: {
    total() { return this.items.length; }
  }
})

// Store: global shared state
wildflower.store('user', {
  state: { name: '', role: 'guest' },
  computed: {
    isAdmin() { return this.role === 'admin'; }
  }
})

// Plugin: extends the framework
wildflower.plugin({
  name: 'notifications',
  state: { items: [], unreadCount: 0 },
  computed: {
    hasUnread() { return this.unreadCount > 0; }
  },
  add(msg) { this.items.push(msg); this.unreadCount++; }
})
// Access globally: wildflower.$notifications.add(...)

// Same state. Same computed. Same methods.

Data Pools

Every framework wraps collection items in reactive proxies, whether the item needs it or not. WildflowerJS gives you a choice: data-list for push reactivity (automatic), data-pool for pull reactivity (explicit control, zero proxy overhead).

Pools render plain objects with the same template syntax as lists. Mutate the object, call markDirty(), and only that item updates. Full CRUD, selection, bulk operations, all faster than the push-reactive path.

And because pools use pull-based rendering, they scale to simulations, games, particle systems, and data visualizations at native frame rate. Use cases that would choke a virtual DOM. No other framework has anything like this.

<div data-component="user-table">
  <tbody data-pool="users" data-key="id">
    <template>
      <tr>
        <td data-bind="name"></td>
        <td data-bind="status"
            data-bind-class="status === 'active'
              ? 'badge success'
              : 'badge inactive'"></td>
      </tr>
    </template>
  </tbody>
</div>
wildflower.component('user-table', {
  pools: { users: {} },

  init() {
    // Populate: plain objects, no proxies
    data.forEach(u => this.pools.users.add(u));
  },

  // Optional: add tick() and the same pool
  // renders every frame. Same template, same
  // data, different rendering frequency.
  // That's the only difference between a
  // display table and a particle system.
})

Built for AI-Assisted Development

Because WildflowerJS is standard HTML and JavaScript, AI code assistants already know how to write it. There's no custom syntax to hallucinate or compiler quirks to work around. The code an AI generates runs exactly as written, with no build step between generation and execution.

We go further. WildflowerJS ships an AI-optimized reference page with patterns, anti-patterns, and examples designed for code generation context windows. Our llms.txt file follows the llms.txt convention for machine-readable documentation.

And for structured app generation, our Universal App Manifest lets you describe an entire application as a JSON schema (components, state, computed properties, methods, templates) and have an AI generate the working code from the manifest, mediated through framework-specific idiom files.

You: "Build me a todo app with
WildflowerJS"

AI reads llms.txt or ai-assistant.html
     ↓
Generates standard HTML + JS
     ↓
<div data-component="todo-app">
  <input data-model="newItem">
  <button data-action="addItem">
    Add
  </button>
  <ul data-list="items">
    <template>
      <li data-bind="text"></li>
    </template>
  </ul>
</div>
     ↓
Open in your browser. It works, and you can read and understand the code.

Pool Performance LITE+

How the pool flush engine works under the hood, and CSS and architecture techniques for maintaining smooth frame rates at scale.

Prerequisites: This page covers performance optimization for entity pools. For background, see Why Pools?. For an introduction, see Entity Pools. For the full API reference, see Pool API.

How the Flush Works

Understanding the pool flush cycle is essential for writing performant pool code. Here is what happens on each animation frame:

  1. FPS throttle check. If data-pool-fps is set, the pool checks whether enough time has elapsed since the last flush. If not, it skips this frame entirely.
  2. tick(dt, now). All component tick hooks fire before flushing, so game state updates are reflected in the same frame.
  3. Static entity cull (camera-driven). If data-pool-static is set, static entities are stored in a separate array. They are only re-culled when setCullBounds() reports a viewport change, not every frame. Bindings are applied once on add() and never re-evaluated.
  4. Dynamic entity cull + bind. For each dynamic entity, the cull check runs first (using data properties or getBoundingClientRect). If culled, the entity is set to display: none and all remaining work is skipped. If visible, bindings are evaluated with per-property change detection.
  5. Z-index sort. If data-pool-sort is set, each visible entity's z-index style is updated from the sort property.
Pool flush pipeline diagram

Zero-Overhead Architecture

The pool flush path is designed to be as close to hand-written DOM manipulation as possible:

  • No Proxy. Entity objects are plain JavaScript objects. No reactive Proxy wrapping, no getter/setter traps, no dependency tracking.
  • No object spreads. Entities are mutated in place. No copying, no immutable updates.
  • No framework helpers. Bindings call pre-compiled functions directly with the entity object. No expression parsing at runtime, no context resolution.
  • Cached element references. Each entity's bound elements are cached in an array at add time (computed from template metadata paths). No querySelector calls during flush.
  • String comparison guards. textContent, style.*, className, and attribute values are compared as strings before writing. The browser never sees a no-op DOM write.

This means the flush cost per entity is essentially: one function call per binding, one string comparison, and (only if changed) one DOM property assignment.

Shared rAF Loop

All pools across all components share a single requestAnimationFrame loop. This avoids the overhead of multiple rAF callbacks and ensures all pool flushes happen in the same frame. The loop automatically starts when the first entity is added to any pool and stops when all pools are empty.

CSS Performance Tips

The DOM flush is only half the picture. The browser still needs to style, layout, paint, and composite your entities. These CSS choices have a significant impact on frame rate.

Prefer transform over left/top for Movement

Using left and top triggers layout recalculation. Using transform: translate() only triggers compositing, which is much cheaper. However, for pool entities, the difference is smaller than in typical CSS animation because the pool already batches all DOM writes into a single frame.

For absolute-positioned entities, left/top is simpler and works well for most pool sizes. Switch to transform if you are hitting frame budget limits:

<!-- Simple: left/top (works well for most cases) -->
<template>
    <div class="entity" data-bind-style="{ left: x + 'px', top: y + 'px' }">
        ...
    </div>
</template>

<!-- Optimized: transform (reduces layout thrashing at high entity counts) -->
<template>
    <div class="entity"
         data-bind-style="{ transform: 'translate(' + x + 'px,' + y + 'px)' }">
        ...
    </div>
</template>

Use scaleY Instead of height for HP Bars

Changing an element's height triggers layout. Using scaleY with transform-origin: bottom achieves the same visual effect through compositing only:

/* CSS */
.hp-fill {
    width: 100%;
    height: 100%;  /* Always full height */
    background: green;
    transform-origin: bottom;
    will-change: transform;
}
<!-- Template: scaleY from 0 to 1 based on HP ratio -->
<div class="hp-bar">
    <div class="hp-fill"
         data-bind-style="{ transform: 'scaleY(' + (hp / maxHp) + ')' }">
    </div>
</div>

Avoid Expensive CSS Properties

Some CSS properties trigger expensive paint operations on every frame. Avoid these on pool entity elements:

PropertyCostAlternative
filter: blur() Very expensive per element Pre-render blurred versions as images
backdrop-filter Very expensive, samples behind Use a semi-transparent overlay image
box-shadow (large radius) Moderate paint cost Use a pre-rendered shadow image or smaller radius
border-radius on images Forces clipping on every paint Pre-crop images to shape, or use clip-path
opacity changes Cheap (compositing only) Good to use freely
transform Cheap (compositing only) Good to use freely

Use will-change Sparingly

will-change: transform promotes an element to its own compositing layer, which makes transform and opacity changes cheaper. However, each promoted layer consumes GPU memory. For pools with hundreds of entities, promoting every entity can exhaust GPU memory and actually decrease performance.

A good strategy is to apply will-change to the pool container rather than to each entity:

/* Promote the container, not individual entities */
[data-pool] {
    will-change: contents;
    contain: layout style;
}

SVG Pre-Rasterization

SVG images are a common source of Chrome performance issues in pool rendering. Chrome re-decodes SVG images on every img.src change, which is devastating for animated sprites. The solution is to pre-rasterize SVGs to bitmap data URIs at load time.

The Problem

If your entities use SVG sprites with frame animation (changing img.src each frame), Chrome must decode the SVG to bitmap on every change. With 50+ entities each changing sprites at 60fps, this completely blows the frame budget.

The Solution

At load time, draw each SVG onto a canvas and extract it as a PNG data URI. Store these in a lookup Map. During the game loop, set imgSrc to the cached data URI instead of the SVG URL.

const spriteCache = new Map();

// Pre-rasterize at load time
async function rasterizeSVG(url, width, height) {
    return new Promise((resolve) => {
        const img = new Image();
        img.crossOrigin = 'anonymous';
        img.onload = () => {
            const canvas = document.createElement('canvas');
            canvas.width = width;
            canvas.height = height;
            canvas.getContext('2d').drawImage(img, 0, 0, width, height);
            try {
                spriteCache.set(url, canvas.toDataURL('image/png'));
            } catch (e) {
                spriteCache.set(url, url); // CORS fallback
            }
            resolve();
        };
        img.onerror = () => { spriteCache.set(url, url); resolve(); };
        img.src = url;
    });
}

// Pre-load all sprites before starting the game
async function preloadSprites() {
    const promises = [];
    for (const sprite of allSpriteURLs) {
        promises.push(rasterizeSVG(sprite, 48, 48));
    }
    await Promise.all(promises);
}

// In the game loop: use cached bitmap instead of SVG URL
function getSprite(url) {
    return spriteCache.get(url) || url;
}

// When updating entity frame:
enemy.imgSrc = getSprite(enemySpriteURLs[enemy.frame]);

This pattern is used in the Tower Defense demo and eliminates the Chrome SVG decode bottleneck entirely.

Architecture Patterns

Separate Game State from Reactive State

The most performant pool architecture keeps all game state as plain JavaScript and only uses WildflowerJS reactive state for UI screens (start, pause, game over). The game loop never touches the reactive system:

wildflower.component('my-game', {
    // Reactive state: only for UI screens
    state: {
        showStart: true,
        showGameOver: false,
        paused: false
    },

    startGame() {
        this.state.showStart = false;

        // All game state is plain JS, not in this.state
        this._score = 0;
        this._wave = 1;
        this._running = true;

        // Start the game loop
        this._gameLoop();
    },

    _gameLoop() {
        if (!this._running) return;

        // Update all entities: pure JS, no reactive overhead
        for (const e of this.pool('enemies').items) {
            e.x += e.vx;
            e.y += e.vy;
        }

        // Update HUD with direct DOM writes (bypass reactive system)
        document.getElementById('score').textContent = this._score;

        requestAnimationFrame(() => this._gameLoop());
    }
});

Direct DOM Writes for Non-Pool UI

In pool-driven components, use direct DOM writes for HUD elements, FPS counters, score displays, and other UI that isn't part of a pool template. This is intentional, not an anti-pattern:

// Inside a rAF loop: direct DOM write is correct here
document.getElementById('fps-display').textContent = fps;
document.getElementById('entity-count').textContent = pool.items.length;

// DON'T use data-bind for values updated 60x/second inside rAF.
// Reactive bindings add overhead that's unnecessary for display-only
// counters outside the pool's template.

Why: Pool components run a requestAnimationFrame loop that updates pool entities directly. Routing HUD updates through the reactive system (state changes, computed re-evaluation, DOM diffing) adds overhead for no benefit. The values are display-only and change every frame, so direct writes are faster and simpler.

When to use data-bind instead: For values that change in response to user interaction or store updates (not per-frame). KPI cards, form inputs, toggle states: these belong in the reactive system.

Entity Removal During Iteration

The pool uses O(1) swap-with-last removal internally. When removing entities during a game loop tick, always iterate the items array in reverse to avoid skipping elements (the swapped-in element would be missed on forward iteration):

// CORRECT: reverse iteration
const pool = this.pool('projectiles');
for (let i = pool.items.length - 1; i >= 0; i--) {
    const p = pool.items[i];
    if (p.x < 0 || p.x > fieldWidth || p.y < 0 || p.y > fieldHeight) {
        pool.remove(p.id);
    }
}
Items array order is not guaranteed. After removals, the pool.items array order may differ from insertion order due to the O(1) swap-with-last removal strategy. Do not rely on items array order for rendering. Entity position should be driven by data properties, not array index.

Throttle Non-Critical Pools

Not every pool needs to update every frame. Use data-pool-fps to reduce CPU usage for pools where lower frame rates are acceptable:

  • Native frame rate (default): player entities, enemies, projectiles, anything the player directly interacts with
  • 30fps: damage numbers, status effects, UI indicators
  • 10-15fps: background particles, ambient effects, minimap markers

Use Data-Based Culling for Large Worlds

If your game world extends beyond the visible viewport, use data-pool-cull-props to enable high-performance spatial culling. This reads entity position directly from data properties instead of calling getBoundingClientRect(), eliminating layout-forcing DOM reads entirely:

<!-- Data-based culling: reads x,y from entity objects -->
<div data-pool="world-entities" data-key="id"
     data-pool-cull="200" data-pool-cull-props="x,y">
    <template>
        <div class="entity" data-bind-style="{ left: x + 'px', top: y + 'px' }">...</div>
    </template>
</div>

<!-- With per-entity size (for varying-size entities) -->
<div data-pool="world-entities" data-key="id"
     data-pool-cull="200" data-pool-cull-props="x,y,w,h">
    ...
</div>

Data-based culling uses display: none for culled entities, removing them from the layout tree entirely. The cull check runs before binding evaluation, so culled entities skip all JS and DOM work, not just paint. With 20,000 entities and 500 visible, only those 500 have bindings evaluated.

Pannable / Zoomable Worlds

For worlds with a CSS camera transform (pan + zoom), entity coordinates don't map to screen position directly. Use setCullBounds() each frame to tell the pool what region of the world is visible:

function updateCamera() {
    worldEl.style.transform = `translate(${panX}px, ${panY}px) scale(${zoom})`;

    pool.setCullBounds(
        -panX / zoom,                // left edge in world coords
        -panY / zoom,                // top edge
        (-panX + viewportW) / zoom,  // right edge
        (-panY + viewportH) / zoom   // bottom edge
    );
}

The pool tracks whether bounds have changed. Static entities are only re-culled when the bounds update, not every frame.

Entity Recycling

When entities are removed with pool.remove(), their DOM nodes are recycled rather than discarded. The pool maintains a free list of detached nodes (up to 100). When pool.push() is called, it reuses a recycled node instead of cloning the template, eliminating DOM node creation and garbage collection overhead.

This is automatic and transparent. The recycled node's classes, styles, and binding caches are reset to the template's original state before new bindings are applied. This correctly handles CSS animations with forwards fill mode (e.g., death animations that end at opacity: 0).

Use pool.recycleSize to inspect the free list during development.

Static Entities

In large worlds, most entities are static: trees, rocks, buildings. These never change after being added. Use data-pool-static to mark them so the pool skips per-frame binding evaluation entirely:

<div data-pool="world" data-key="id"
     data-pool-cull="100" data-pool-cull-props="x,y"
     data-pool-static="isStatic">
    <template>...</template>
</div>
// Static: rendered once, never re-evaluated
pool.push({ id: 1, x: 100, y: 200, emoji: '🌳', isStatic: true });

// Dynamic: evaluated every frame
pool.push({ id: 2, x: 50, y: 75, emoji: '🐝', isStatic: false });

Static entities are stored in a separate internal array. The flush loop only iterates dynamic entities each frame. Static entities are re-culled only when setCullBounds() reports a camera change. This means a world with 20,000 static trees and 500 dynamic bees only processes the 500 bees per frame.

Profiling

Use the browser's Performance panel to identify bottlenecks. The pool flush appears as a series of style and layout recalculations within the rAF callback. Key things to look for:

  • Long "Recalculate Style" blocks. Too many class changes or complex CSS selectors on entities. Simplify entity CSS.
  • Layout thrashing. Reading layout properties (offsetTop, getBoundingClientRect()) between DOM writes. The pool system avoids this internally, but your game code might trigger it.
  • "Decode Image" blocks. SVG re-decoding. Use the pre-rasterization pattern described above.
  • Large paint regions. Elements with filter, box-shadow, or large border-radius. Use the alternatives from the CSS tips section.

The Performance panel's "Frames" view shows whether you are consistently hitting your frame budget. At 60fps, each frame has 16.6ms. The pool flush itself typically takes under 1ms for 100 entities. Most of the frame budget goes to browser style/layout/paint.

Related: For general WildflowerJS performance optimization (not pool-specific), see Performance Optimization.