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.

Migrating from React

A practical guide for React developers moving to WildflowerJS. This page maps React concepts to their WildflowerJS equivalents, compares the two approaches side by side, and walks through each pattern you will need to convert.

Who this is for: Developers with React experience who want to understand how WildflowerJS achieves the same results with less tooling, less boilerplate, and a fundamentally different reactivity model.

Mental Model Shift

React and WildflowerJS solve the same problem — keeping the UI in sync with application state — but their approaches differ at every level. Understanding these differences is more important than memorizing syntax.

Concern React WildflowerJS
DOM strategy Virtual DOM + reconciliation. React builds a virtual tree, diffs it against the previous tree, and patches the real DOM with the minimum set of changes. Direct DOM updates. When state changes, WildflowerJS updates only the specific DOM elements that are bound to the changed property. No diffing step, no virtual tree.
Markup JSX, JavaScript-embedded markup. HTML lives inside JavaScript functions and is compiled by Babel or SWC before the browser sees it. Standard HTML with data-* attributes. Markup stays as HTML in .html files. No compilation step, no transpilation.
State mutation Immutable. You must call setState or a setter from useState, typically with spread operators to create new objects/arrays. Direct mutation. this.count++, this.items.push(item), this.user.name = 'Alice'. The reactive proxy detects the change and triggers updates.
Update granularity Component re-rendering. When state changes, the entire component function re-runs, producing a new virtual tree to diff. Element-level updates. Only the DOM elements bound to the changed property are updated. Other elements in the component are untouched.
Derived values Hooks with dependency arrays. useMemo(() => ..., [dep1, dep2]). You must manually list dependencies; stale closures occur if you forget one. Declarative computed properties. computed: { fullName() { return this.first + ' ' + this.last; } }. Dependencies are auto-tracked, with no array to maintain.
The key insight: In React, you tell the framework what the UI should look like and it figures out what changed. In WildflowerJS, you tell the framework what data each element displays and it updates that element when the data changes. This eliminates the need for a virtual DOM, memoization, and dependency arrays.

Concept Mapping

Quick reference for translating React patterns to WildflowerJS equivalents:

Concept React WildflowerJS
Component function MyComp() { return <div>...</div>; } <div data-component="my-comp">...</div> + wildflower.component('my-comp', { ... })
State const [count, setCount] = useState(0) state: { count: 0 } then this.count++
Computed / Memo useMemo(() => items.filter(...), [items]) computed: { filtered() { return this.items.filter(...); } }
Side Effects useEffect(() => { ... return cleanup; }, [deps]) init() { ... } and destroy() { ... }
Events <button onClick={handleClick}> <button data-action="handleClick">
Conditional {show && <div>...</div>} or ternary <div data-show="show"> or <div data-render="show">
List {items.map(item => <li key={item.id}>...</li>)} <ul data-list="items" data-key="id"><template>...</template></ul>
Two-way binding <input value={val} onChange={e => setVal(e.target.value)} /> <input data-model="val" />
Global state createContext + useContext, or Redux / Zustand wildflower.store('name', { ... }) + subscribe: { storeName: [...] }
Lifecycle useEffect(() => { ... }, []) for mount, return for unmount init() for mount, destroy() for unmount
Routing React Router: <Route path="/about" element={<About />} /> wildflower.routes({ '/about': { component: 'about-page' } })
Styling CSS modules, styled-components, or inline style={{ }} Standard CSS, data-bind-class, data-bind-style

Side-by-Side: Todo App

The best way to see the differences is a complete example. Here is the same Todo application built in both frameworks.

React (functional component with hooks)

function TodoApp() {
    const [todos, setTodos] = useState([]);
    const [newTodo, setNewTodo] = useState('');
    const remaining = useMemo(() =>
        todos.filter(t => !t.done).length, [todos]);

    function addTodo() {
        if (!newTodo.trim()) return;
        setTodos([...todos, {
            id: Date.now(),
            text: newTodo,
            done: false
        }]);
        setNewTodo('');
    }

    function toggleTodo(id) {
        setTodos(todos.map(t =>
            t.id === id
                ? { ...t, done: !t.done }
                : t
        ));
    }

    function removeTodo(id) {
        setTodos(todos.filter(t =>
            t.id !== id));
    }

    return (
        <div>
            <h3>Todos ({remaining} remaining)</h3>
            <input
                value={newTodo}
                onChange={e =>
                    setNewTodo(e.target.value)}
                onKeyDown={e =>
                    e.key === 'Enter' && addTodo()}
            />
            <button onClick={addTodo}>Add</button>
            <ul>
                {todos.map(todo => (
                    <li key={todo.id}>
                        <input
                            type="checkbox"
                            checked={todo.done}
                            onChange={() =>
                                toggleTodo(todo.id)}
                        />
                        <span style={{
                            textDecoration: todo.done
                                ? 'line-through'
                                : 'none'
                        }}>
                            {todo.text}
                        </span>
                        <button onClick={() =>
                            removeTodo(todo.id)}>
                            &times;
                        </button>
                    </li>
                ))}
            </ul>
        </div>
    );
}

WildflowerJS (HTML + JS)

<div data-component="todo-app">
    <h3>Todos (<span data-bind="remaining">0</span>
        remaining)</h3>
    <input data-model="newTodo"
           data-action="keydown.enter:addTodo" />
    <button data-action="addTodo">Add</button>
    <ul data-list="todos" data-key="id">
        <template>
            <li>
                <input type="checkbox"
                       data-model="done" />
                <span data-bind="text"
                      data-bind-style="{ textDecoration: done ? 'line-through' : 'none' }"></span>
                <button data-action="removeTodo">
                    &times;
                </button>
            </li>
        </template>
    </ul>
</div>
wildflower.component('todo-app', {
    state: { todos: [], newTodo: '' },
    computed: {
        remaining() {
            return this.todos.filter(
                t => !t.done
            ).length;
        }
    },
    addTodo() {
        if (!this.newTodo.trim()) return;
        this.todos.push({
            id: Date.now(),
            text: this.newTodo,
            done: false
        });
        this.newTodo = '';
    },
    removeTodo(event, element, details) {
        this.todos.splice(details.index, 1);
    }
});
What to notice:
  • No immutable spreads: this.todos.push() replaces setTodos([...todos, item])
  • No toggle function: data-model="done" on the checkbox handles two-way binding automatically
  • No dependency array: the remaining computed property auto-tracks its dependency on this.todos
  • No event wiring: data-action="removeTodo" replaces onClick={() => removeTodo(todo.id)}; the list index arrives in details.index
  • No build step: the HTML is valid as-is; no JSX compilation needed

Pattern-by-Pattern Migration

Component Definition

React components are JavaScript functions that return JSX. WildflowerJS components are HTML elements paired with a JavaScript definition object.

React
function Greeting({ name }) {
    return <h1>Hello, {name}!</h1>;
}

// Usage:
<Greeting name="Alice" />
WildflowerJS
<div data-component="greeting">
    <h1>Hello, <span data-bind="name"></span>!</h1>
</div>
wildflower.component('greeting', {
    props: { name: { type: String, default: '' } }
});
<!-- Usage: -->
<div data-component="greeting"
     data-prop-name="Alice"></div>
Key difference: React components define their markup in JavaScript. WildflowerJS components define their markup in HTML and their behavior in JavaScript. The HTML is the template; the JavaScript is the logic.

State Management

React requires setter functions and immutable updates. WildflowerJS uses direct property mutation on a reactive proxy.

React
function Counter() {
    const [count, setCount] = useState(0);
    const [user, setUser] = useState({
        name: 'Alice',
        score: 0
    });

    function increment() {
        setCount(c => c + 1);
    }

    function updateScore() {
        // Must spread to create new object
        setUser({ ...user, score: user.score + 10 });
    }

    return (
        <div>
            <p>Count: {count}</p>
            <button onClick={increment}>+1</button>
            <p>{user.name}: {user.score}</p>
            <button onClick={updateScore}>
                +10 points
            </button>
        </div>
    );
}
WildflowerJS
<div data-component="counter">
    <p>Count: <span data-bind="count"></span></p>
    <button data-action="increment">+1</button>
    <p><span data-bind="user.name"></span>:
       <span data-bind="user.score"></span></p>
    <button data-action="updateScore">
        +10 points
    </button>
</div>
wildflower.component('counter', {
    state: {
        count: 0,
        user: { name: 'Alice', score: 0 }
    },

    increment() {
        this.count++;
    },

    updateScore() {
        // Direct mutation: no spread needed
        this.user.score += 10;
    }
});

Computed Values

React's useMemo requires an explicit dependency array. WildflowerJS computed properties auto-track dependencies.

React
function ProductList({ products }) {
    const [filter, setFilter] = useState('');

    // Must list dependencies manually
    const filtered = useMemo(() =>
        products.filter(p =>
            p.name.toLowerCase()
             .includes(filter.toLowerCase())
        ),
        [products, filter] // forget one = stale data
    );

    const total = useMemo(() =>
        filtered.reduce((sum, p) =>
            sum + p.price, 0),
        [filtered]
    );

    return (
        <div>
            <input value={filter}
                onChange={e => setFilter(e.target.value)}
                placeholder="Search..." />
            <p>{filtered.length} items, ${total}</p>
        </div>
    );
}
WildflowerJS
<div data-component="product-list">
    <input data-model="filter"
           placeholder="Search..." />
    <p><span data-bind="filtered.length"></span>
       items, $<span data-bind="total"></span></p>
</div>
wildflower.component('product-list', {
    state: {
        products: [],
        filter: ''
    },

    computed: {
        // Dependencies auto-tracked
        filtered() {
            return this.products.filter(p =>
                p.name.toLowerCase()
                 .includes(this.filter.toLowerCase())
            );
        },

        total() {
            return this.filtered.reduce(
                (sum, p) => sum + p.price, 0
            );
        }
    }
});
Chained computed properties: Notice that total depends on filtered, which depends on products and filter. WildflowerJS tracks the entire chain automatically. In React, you would need to list the correct dependency for each useMemo call.

Side Effects

React uses useEffect for mount/unmount logic and for responding to state changes. WildflowerJS splits these into init()/destroy() lifecycle methods and watch handlers.

React
function Timer() {
    const [seconds, setSeconds] = useState(0);

    // Mount + cleanup
    useEffect(() => {
        const id = setInterval(() => {
            setSeconds(s => s + 1);
        }, 1000);
        return () => clearInterval(id);
    }, []);

    // Respond to state change
    useEffect(() => {
        document.title = `${seconds}s elapsed`;
    }, [seconds]);

    return <p>{seconds} seconds</p>;
}
WildflowerJS
<div data-component="timer">
    <p><span data-bind="seconds"></span> seconds</p>
</div>
wildflower.component('timer', {
    state: { seconds: 0 },

    // watch must be a top-level definition key
    // (not assigned inside init)
    watch: {
        seconds() {
            document.title =
                `${this.seconds}s elapsed`;
        }
    },

    init() {
        this._interval = setInterval(() => {
            this.seconds++;
        }, 1000);
    },

    destroy() {
        clearInterval(this._interval);
    }
});

Event Handling

React passes inline functions or references. WildflowerJS uses data-action to bind events to method names.

React
function Form() {
    const [name, setName] = useState('');

    function handleSubmit(e) {
        e.preventDefault();
        console.log('Submitted:', name);
    }

    return (
        <form onSubmit={handleSubmit}>
            <input
                value={name}
                onChange={e =>
                    setName(e.target.value)}
            />
            <button type="submit">Go</button>
        </form>
    );
}
WildflowerJS
<div data-component="my-form">
    <form data-action="submit.prevent:handleSubmit">
        <input data-model="name" />
        <button type="submit">Go</button>
    </form>
</div>
wildflower.component('my-form', {
    state: { name: '' },

    handleSubmit() {
        console.log('Submitted:', this.name);
    }
});
Event modifiers: WildflowerJS supports modifiers like .prevent, .stop, .enter, .escape directly in the data-action attribute, replacing the need for e.preventDefault() or e.stopPropagation() calls in your methods.

Conditional Rendering

React uses JavaScript expressions inside JSX. WildflowerJS uses data-show (toggles visibility) and data-render (adds/removes from DOM).

React
function Alert({ type, message }) {
    return (
        <div>
            {type === 'error' && (
                <div className="alert-error">
                    {message}
                </div>
            )}
            {type === 'success' && (
                <div className="alert-success">
                    {message}
                </div>
            )}
            {!message && (
                <p>No messages</p>
            )}
        </div>
    );
}
WildflowerJS
<div data-component="alert-box">
    <div class="alert-error"
         data-show="type === 'error'">
        <span data-bind="message"></span>
    </div>
    <div class="alert-success"
         data-show="type === 'success'">
        <span data-bind="message"></span>
    </div>
    <p data-show="!message">No messages</p>
</div>
wildflower.component('alert-box', {
    state: {
        type: '',
        message: ''
    }
});
data-show vs data-render: Use data-show when elements toggle frequently (it sets display: none). Use data-render when elements are rarely shown or contain heavy sub-components (it removes them from the DOM entirely, like React's conditional {cond && <Component />}).

List Rendering

React uses .map() inside JSX with a key prop. WildflowerJS uses data-list with a <template>.

React
function UserList({ users }) {
    return (
        <ul>
            {users.map(user => (
                <li key={user.id}>
                    <strong>{user.name}</strong>
                    <span>{user.email}</span>
                    <button onClick={() =>
                        deleteUser(user.id)}>
                        Delete
                    </button>
                </li>
            ))}
        </ul>
    );
}
WildflowerJS
<ul data-list="users" data-key="id">
    <template>
        <li>
            <strong data-bind="name"></strong>
            <span data-bind="email"></span>
            <button data-action="deleteUser">
                Delete
            </button>
        </li>
    </template>
</ul>
Inside templates: Within a data-list template, data-bind references properties of the current item, not the parent component. So data-bind="name" means item.name. The action method receives the item index in details.index.
Large collections? For hundreds of items or more, consider data-pool, WildflowerJS's pull-reactive rendering mode. Same template syntax, zero proxy overhead, with explicit update control via markDirty(). No virtualization library needed.

Forms and Two-Way Binding

React requires controlled components with value + onChange. WildflowerJS uses data-model for two-way binding.

React
function SignupForm() {
    const [email, setEmail] = useState('');
    const [password, setPassword] = useState('');
    const [agree, setAgree] = useState(false);
    const [role, setRole] = useState('user');

    return (
        <form>
            <input type="email"
                value={email}
                onChange={e =>
                    setEmail(e.target.value)} />
            <input type="password"
                value={password}
                onChange={e =>
                    setPassword(e.target.value)} />
            <input type="checkbox"
                checked={agree}
                onChange={e =>
                    setAgree(e.target.checked)} />
            <select value={role}
                onChange={e =>
                    setRole(e.target.value)}>
                <option value="user">User</option>
                <option value="admin">Admin</option>
            </select>
        </form>
    );
}
WildflowerJS
<div data-component="signup-form">
    <form>
        <input type="email"
               data-model="email" />
        <input type="password"
               data-model="password" />
        <input type="checkbox"
               data-model="agree" />
        <select data-model="role">
            <option value="user">User</option>
            <option value="admin">Admin</option>
        </select>
    </form>
</div>
wildflower.component('signup-form', {
    state: {
        email: '',
        password: '',
        agree: false,
        role: 'user'
    }
});
No controlled component boilerplate: React requires a separate useState and onChange handler for every form field. WildflowerJS's data-model handles read and write in a single attribute. For a form with 10 fields, that eliminates 20 lines of React boilerplate.

Global State

React uses Context/useContext or external libraries (Redux, Zustand). WildflowerJS has a built-in store system.

React (Context + useContext)
// Define context
const ThemeContext = createContext();

function ThemeProvider({ children }) {
    const [theme, setTheme] = useState('light');
    return (
        <ThemeContext.Provider
            value={{ theme, setTheme }}>
            {children}
        </ThemeContext.Provider>
    );
}

// Consume in any child
function ThemedButton() {
    const { theme, setTheme } = useContext(
        ThemeContext
    );
    return (
        <button
            className={theme}
            onClick={() =>
                setTheme(theme === 'light'
                    ? 'dark' : 'light')
            }>
            Toggle ({theme})
        </button>
    );
}
WildflowerJS (Store)
// Define store (once, anywhere)
wildflower.store('theme', {
    state: { mode: 'light' },

    toggle() {
        this.mode = this.mode === 'light'
            ? 'dark' : 'light';
    }
});
<!-- Consume in any component -->
<!-- Use $storeName.property to bind directly to store state -->
<div data-component="themed-button">
    <button data-action="toggle"
            data-bind-class="$theme.mode">
        Toggle (<span data-bind="$theme.mode"></span>)
    </button>
</div>
wildflower.component('themed-button', {
    subscribe: ['theme'],

    toggle() {
        wildflower.getStore('theme').toggle();
    }
});
No provider wrapping: React's Context requires wrapping your component tree in a <Provider>. WildflowerJS stores are globally accessible. Any component can subscribe to any store without changing the component hierarchy.

Common Gotchas for React Developers

These are the most frequent stumbling blocks when coming from React.

Don't spread state.

React habits die hard. You might write this.items = [...this.items, newItem] out of muscle memory. It works, but this.items.push(newItem) is simpler and triggers fine-grained updates: only the new list item is rendered, rather than replacing the entire list.

No dependency arrays.

Computed properties auto-track every reactive property accessed during execution. There is no [deps] argument. If you find yourself wondering "what are the dependencies?", stop. The framework already knows.

Methods are not recreated.

In React, functions defined inside a component are new references on every render, which is why useCallback exists. WildflowerJS methods are defined once on the component definition and are stable references. There is no equivalent of useCallback because there is no problem to solve.

No component re-render.

This is the biggest conceptual shift. When this.count changes, WildflowerJS does not re-run your component definition or re-evaluate your template. It updates only the DOM elements that have data-bind="count". Everything else is untouched.

Don't look for React.memo.

React.memo prevents unnecessary re-renders of child components. In WildflowerJS, there are no re-renders to prevent. Each binding updates independently, so the problem React.memo solves does not exist.

Actions, not inline handlers.

data-action="doSomething" calls a method by string name. You cannot write data-action="() => doSomething(42)". If you need to pass context, use data-* attributes on the element and read them from the element parameter in your method: doSomething(event, element) { const id = element.dataset.id; }.

Migration Checklist

Follow these steps when converting a React application to WildflowerJS. Tackle one component at a time.

  1. Remove build tooling for JSX. Webpack/Vite/Babel configurations for JSX transpilation are no longer needed. WildflowerJS uses standard HTML and vanilla JavaScript. No compile step required. You can still use a bundler for other purposes if you choose.
  2. Replace JSX with HTML + data-* attributes. Convert each component's return statement from JSX to an HTML element with data-component. Replace {variable} expressions with data-bind="variable" on <span> elements.
  3. Convert useState to state object properties. Gather all useState calls into a single state: { ... } object in the component definition. Replace setter calls (setCount(c => c + 1)) with direct mutation (this.count++).
  4. Convert useMemo and useCallback to computed properties. Move memoized values into computed: { ... }. Remove the dependency arrays entirely. Remove all useCallback wrappers. They have no equivalent because methods are already stable.
  5. Convert useEffect to init() / destroy() lifecycle. Mount effects (useEffect(..., [])) go in init(). Cleanup functions become the destroy() method. State-watching effects become this.watch = { propName: callback }.
  6. Replace Context / Redux with wildflower.store. Define stores with wildflower.store('name', { state: {...}, methodName() {...} }). Methods go at the top level, not inside a methods block. In components, use subscribe: ['storeName'] and bind with $storeName.property. Remove all <Provider> wrapper components.
  7. Replace React Router with WildflowerJS RouteManager. Convert <Route> definitions to wildflower.routes({ '/path': { component: 'name' } }). Replace <Link to="..."> with <a href="..." data-route>.
  8. Remove performance optimizations that are no longer needed. Delete React.memo() wrappers, useCallback() calls, and manual shouldComponentUpdate logic. These solve React-specific problems that do not exist in WildflowerJS's binding-level update model.
  9. Test each component individually. After converting a component, verify it works in isolation before moving on. WildflowerJS components are self-contained, so you can migrate incrementally.
Incremental migration is possible. Because WildflowerJS works with standard HTML, you can convert one page or section at a time. React components and WildflowerJS components can coexist on the same page during the transition (they operate on different parts of the DOM).