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.

State Management

State management in WildflowerJS is built around reactive data that automatically updates the UI when changed. Learn how to manage component state, computed properties, and cross-component communication.

State Features:
  • Automatic reactivity and UI updates
  • Nested object and array support
  • Computed properties with caching
  • Cross-component state sharing
  • Batched updates for performance

Basic State Management

Defining Component State

State is defined in the component's state property and becomes automatically reactive:

wildflower.component('user-profile', {
    state: {
        // Primitive values
        name: 'John Doe',
        age: 30,
        isActive: true,
        
        // Objects
        address: {
            street: '123 Main St',
            city: 'Springfield',
            zipCode: '12345'
        },
        
        // Arrays
        hobbies: ['reading', 'hiking', 'cooking'],
        
        // Complex nested data
        settings: {
            notifications: {
                email: true,
                push: false
            }
        }
    }
})

Reading State

Access state values directly via this in component methods. The framework's context proxy resolves this.count to the underlying state.count, and this.count = 5 writes to it reactively:

wildflower.component('counter', {
    state: {
        count: 0,
        step: 1
    },

    getCurrentCount() {
        return this.count  // Resolves to state.count
    },

    increment() {
        this.count += this.step  // Read and modify
    }
})
Shorthand: this.count and this.state.count are equivalent. The proxy resolves computed properties first, then state properties. Use the explicit this.state.X form only when a state property name collides with a computed or framework property.

Updating State

State updates automatically trigger UI re-renders:

<div data-component="state-demo">
    <div class="my-3">
        <p><strong>Count:</strong> <span data-bind="count">0</span></p>
        <p><strong>Status:</strong> <span data-bind="message">System ready.</span></p>
        <p><strong>User:</strong> <span data-bind="user.name">John</span> (<span data-bind="user.age">25</span>)</p>
    </div>
    
    <div class="my-3">
        <button class="btn btn-primary btn-sm me-2 mb-2" data-action="incrementCount">
            Increment Count
        </button>
        <button class="btn btn-success btn-sm me-2 mb-2" data-action="updateMessage">
            Trigger Event
        </button>
        <button class="btn btn-info btn-sm me-2 mb-2" data-action="updateUser">
            Update User
        </button>
        <button class="btn btn-danger btn-sm mb-2" data-action="resetAll">
            Reset All
        </button>
    </div>
    
    <div class="my-3">
        <h5>Update History:</h5>
        <div data-list="history" class="border rounded p-2" style="max-height: 150px; overflow-y: auto;">
            <template>
                <div class="border-bottom pb-1 mb-1 small">
                    <span data-bind="timestamp"></span> - <span data-bind="action"></span>
                </div>
            </template>
        </div>
    </div>
</div>
wildflower.component('state-demo', {
    state: {
        count: 0,
        message: 'System ready.',
        user: {
            name: 'John',
            age: 25
        },
        history: []
    },
    
    addToHistory(action) {
        this.history.unshift({
            timestamp: new Date().toLocaleTimeString(),
            action: action
        })

        // Keep only last 10 items
        if (this.history.length > 10) {
            this.history = this.history.slice(0, 10)
        }
    },

    incrementCount() {
        this.count++
        this.addToHistory(`Count incremented to ${this.count}`)
    },

    updateMessage() {
        const messages = [
            'User logged in.',
            'Settings saved.',
            'Data synchronized.',
            'Cache cleared.',
            'Session refreshed.'
        ]
        this.message = messages[Math.floor(Math.random() * messages.length)]
        this.addToHistory(`Status: ${this.message}`)
    },

    updateUser() {
        const names = ['Alice', 'Bob', 'Carol', 'David', 'Eve']
        const ages = [22, 25, 28, 31, 35]

        this.user.name = names[Math.floor(Math.random() * names.length)]
        this.user.age = ages[Math.floor(Math.random() * ages.length)]
        this.addToHistory(`User updated to: ${this.user.name}, age ${this.user.age}`)
    },

    resetAll() {
        this.count = 0
        this.message = 'System ready.'
        this.user = { name: 'John', age: 25 }
        this.history = []
        this.addToHistory('System reset complete.')
    }
})
Live Preview

Computed Properties

Defining Computed Properties

Computed properties derive values from state and are automatically cached and updated:

<div data-component="shopping-cart">
    <div class="my-3">
        <button class="btn btn-success btn-sm me-2" data-action="addRandomItem">
            Add Random Item
        </button>
        <button class="btn btn-danger btn-sm" data-action="clearCart">
            Clear Cart
        </button>
    </div>
    
    <div data-show="hasItems">
        <h5>Cart Items:</h5>
        <div data-list="items" class="my-3">
            <template>
                <div class="d-flex justify-content-between p-2 border-bottom">
                    <span>
                        <span data-bind="name"></span> × <span data-bind="quantity"></span>
                        @ $<span data-bind="price"></span>
                    </span>
                    <span>$<span data-bind="(price * quantity).toFixed(2)"></span></span>
                </div>
            </template>
        </div>
        
        <div class="border-top pt-3 fw-bold">
            <div class="d-flex justify-content-between">
                <span>Items:</span>
                <span data-bind="itemCount"></span>
            </div>
            <div class="d-flex justify-content-between">
                <span>Subtotal:</span>
                <span>$<span data-bind="subtotal"></span></span>
            </div>
            <div class="d-flex justify-content-between">
                <span>Tax (8%):</span>
                <span>$<span data-bind="tax"></span></span>
            </div>
            <div class="d-flex justify-content-between fs-5 text-success">
                <span>Total:</span>
                <span data-bind="formattedTotal"></span>
            </div>
        </div>
    </div>
    
    <div data-show="!hasItems" class="text-center text-muted py-5">
        Your cart is empty. Add some items!
    </div>
</div>
wildflower.component('shopping-cart', {
    state: {
        items: [],
        taxRate: 0.08
    },
    
    computed: {
        // Simple computed property
        itemCount() {
            return this.items.length
        },

        // Complex calculation
        subtotal() {
            return this.items.reduce((sum, item) =>
                sum + (item.price * item.quantity), 0
            ).toFixed(2)
        },

        // Computed using other computeds (this.subtotal resolves to computed)
        tax() {
            return (parseFloat(this.subtotal) * this.taxRate).toFixed(2)
        },

        total() {
            return (parseFloat(this.subtotal) + parseFloat(this.tax)).toFixed(2)
        },

        // Formatted output
        formattedTotal() {
            return '$' + this.total
        },

        // Boolean computed property
        hasItems() {
            return this.items.length > 0
        }
    },

    addRandomItem() {
        const products = [
            { name: 'Laptop', price: 999 },
            { name: 'Mouse', price: 25 },
            { name: 'Keyboard', price: 75 },
            { name: 'Monitor', price: 299 },
            { name: 'Headphones', price: 149 }
        ]

        const product = products[Math.floor(Math.random() * products.length)]

        this.items.push({
            ...product,
            quantity: Math.floor(Math.random() * 3) + 1
        })
    },

    clearCart() {
        this.items = []
    }
})
Live Preview

Computed Property Benefits

🚀 Performance

Computed properties are cached and only recalculated when their dependencies change, avoiding unnecessary computations.

🔄 Automatic Updates

When state changes, computed properties automatically update and trigger UI re-renders where needed.

Item-Level Computed Properties

For per-item calculations in lists, use item-level computed properties. The framework automatically detects these by checking if the function has parameters (fn.length > 0).

Signature: (item, index) - matches JavaScript array method conventions (like map, forEach).
wildflower.component('product-list', {
    state: {
        products: [{ id: 1, name: 'Widget', price: 10 }],
        taxRate: 0.1
    },

    subscribe: {
        'cart': ['items']
    },

    computed: {
        // Component-level (no parameters)
        totalProducts() {
            return this.products.length;
        },

        // Item-level (has parameters) - evaluated per list item
        priceWithTax(item) {
            return '$' + (item.price * (1 + this.taxRate)).toFixed(2);
        },

        // Can access store state - automatically reactive!
        inCartQty(item) {
            return this.stores.cart.items.find(i => i.id === item.id)?.qty || 0;
        },

        // Can call other item-level computeds
        isInCart(item) {
            return this.computed.inCartQty(item) > 0;
        },

        // Index is available as second parameter
        rowClass(item, index) {
            return index % 2 === 0 ? 'even' : 'odd';
        }
    }
});
<div data-list="products" data-key="id">
    <template>
        <div data-bind-class="rowClass">
            <span data-bind="name"></span>
            <span data-bind="priceWithTax"></span>
            <span data-show="isInCart">IN CART</span>
        </div>
    </template>
</div>

Key features:

  • Store reactivity: When store state changes, only affected list item bindings update
  • Full context: State, props, and stores are all available via this
  • Chaining: Item-level computeds can call other item-level computeds via this.computed.name(item) (the computed prefix is required here to pass the item argument)
  • Resolves at every binding site: data-bind, data-bind-class, data-bind-style, data-bind-attr, data-show, data-render, and as the source array of a nested data-list. The framework reads item[path] first and falls back to evaluating the item-level computed of the same name when the field is undefined. See the lists guide for the nested-list pattern.

Cross-Component State

External State Access

For HTML bindings, use the $ accessor directly: data-bind="$user-service.currentUser.name". For JavaScript access, use subscribe with this.stores for stores, or wildflower.getComponent() for components:

// User service store
wildflower.store('user-service', {
    state: {
        currentUser: { name: 'John Doe', role: 'admin' },
        isAuthenticated: true
    }
})

// Navigation component subscribing to the store
wildflower.component('app-navigation', {
    subscribe: {
        'user-service': ['currentUser', 'isAuthenticated']
    },

    computed: {
        userDisplayName() {
            const user = this.stores['user-service'].currentUser
            return user ? user.name : 'Guest'
        },

        showAdminMenu() {
            const user = this.stores['user-service'].currentUser
            return user && user.role === 'admin'
        },

        isLoggedIn() {
            return this.stores['user-service'].isAuthenticated
        }
    }
})

Store-Based State Management

For global application state, use the store system:

// Create a global store
wildflower.store('app-state', {
    state: {
        theme: 'light',
        user: null,
        notifications: []
    },

    computed: {
        isDarkMode() {
            return this.theme === 'dark'
        },

        unreadCount() {
            return this.notifications.filter(n => !n.read).length
        }
    },

    // Methods go at top level (not in an actions block)
    setTheme(newTheme) {
        this.theme = newTheme
    },

    addNotification(notification) {
        this.notifications.push({
            ...notification,
            id: Date.now(),
            read: false
        })
    }
})

// Use store in components
wildflower.component('theme-toggle', {
    subscribe: {
        'app-state': ['theme']
    },

    computed: {
        currentTheme() {
            return this.stores['app-state'].theme
        }
    },

    toggleTheme() {
        const newTheme = this.currentTheme === 'light' ? 'dark' : 'light'
        this.stores['app-state'].setTheme(newTheme)
    }
})

State Update Patterns

Batch Updates

Multiple state changes in the same method are automatically batched:

wildflower.component('form-handler', {
    state: {
        user: { name: '', email: '', age: 0 },
        errors: {},
        isValid: false
    },
    
    updateUser(userData) {
        // All these updates are batched into a single UI update
        this.user.name = userData.name
        this.user.email = userData.email
        this.user.age = userData.age
        this.isValid = this.validateUser()
        this.errors = this.getValidationErrors()
        
        // UI updates once after all changes
    }
})

Immutable Updates

For complex objects, consider immutable update patterns:

wildflower.component('todo-manager', {
    state: {
        todos: [
            { id: 1, text: 'Learn WildflowerJS', completed: false }
        ]
    },
    
    // Immutable array update
    addTodo(text) {
        this.todos = [
            ...this.todos,
            { id: Date.now(), text, completed: false }
        ]
    },

    // Immutable object update
    updateTodo(id, updates) {
        this.todos = this.todos.map(todo =>
            todo.id === id ? { ...todo, ...updates } : todo
        )
    },

    // Direct mutation (also works)
    toggleTodo(id) {
        const todo = this.todos.find(t => t.id === id)
        if (todo) {
            todo.completed = !todo.completed
        }
    }
})

State Best Practices

✅ Best Practices
  • Initialize state with appropriate default values
  • Use computed properties for derived data
  • Keep state structure flat when possible
  • Use stores for global application state
  • Batch multiple state updates in single methods
  • Use $name.path in HTML for cross-entity data access
⚠️ Common Pitfalls
  • Don't store computed values in state
  • Avoid circular dependencies between components
  • Don't mutate state outside of component methods
  • Avoid deeply nested state structures
  • Don't use state for UI-only data (use CSS/DOM)
  • Don't forget to clean up subscriptions and timers

Serializing reactive state (wildflower.toRaw)

Reactive state is wrapped in Proxy objects so the framework can track reads and intercept writes. Most of the time the proxy is invisible: it stringifies, iterates, and JSON-serializes like a plain object. There is one class of API that rejects it: anything that uses the browser's structured-clone algorithm.

Structured-clone APIs throw DataCloneError on a reactive proxy:

  • indexedDB reads and writes
  • postMessage (window, worker, iframe)
  • Web Workers and SharedWorker message channels
  • BroadcastChannel.postMessage
  • Cache.put / Cache.add (the Service Worker Cache API)
  • history.pushState / history.replaceState state objects

wildflower.toRaw(value) returns a deep plain-JS snapshot of any reactive value, ready to cross those boundaries:

// in a component or store method
async save() {
    var raw = wildflower.toRaw(this.state.items);
    var db = await openDB();
    var tx = db.transaction('items', 'readwrite');
    await tx.objectStore('items').put(raw);
}

// postMessage to a worker
worker.postMessage({
    type: 'compute',
    payload: wildflower.toRaw(this.state.config)
});

// history state
wildflower.router.navigate('/results', {
    state: wildflower.toRaw(this.state.filters)
});

The snapshot is a one-time copy. Mutations to the snapshot do not flow back into the reactive state, and subsequent state changes do not show up in the snapshot. Re-call toRaw when you need a fresh copy.

Only reach for toRaw when the proxy is the actual problem. Plain reads (x.y.z), iteration (for...of), JSON.stringify, and most third-party libraries work directly on the proxy. fetch with a JSON body works directly. The structured-clone APIs above are the exceptions that need the unwrap.

Performance Considerations

State Update Optimization

  • Batching: Multiple state changes in one method trigger only one UI update
  • Dependency Tracking: Only components that use changed state are updated
  • Computed Caching: Computed properties are cached until their dependencies change
  • Pattern Trie: Efficient dependency lookup for large applications

Memory Management

  • Components automatically clean up their state when destroyed
  • Store subscriptions are automatically tracked and cleaned
  • Use the destroy() hook for manual cleanup of timers, subscriptions, etc.

Ready for the next step?

Now that you understand state management, learn how data binding connects your state to the DOM.