Registry / web-framework / maverick.js

maverick.js

JSON →
library0.43.2jsnpmunverified

Maverick.js is a collection of JavaScript/TypeScript libraries designed for building fast, type-safe, and highly reactive UI component libraries and web applications. Its core is the `@maverick-js/signals` package, a lightweight (~1KB minzipped) and extremely performant reactivity system inspired by SolidJS and Svelte. This signals library provides primitives like `signal`, `computed`, and `effect` for fine-grained, lazy, and batched updates, working seamlessly across browsers and Node.js. The ecosystem also includes `@maverick-js/elemental` for creating reactive Web Components with JSX and Server-Side Rendering (SSR) support, and `@maverick-js/maverick` as the main UI component library which leverages these foundations. The project is actively developed, with version 0.43.2 being the current stable release, demonstrating frequent patch and minor updates. Its key differentiators include minimal bundle size, strong TypeScript support, and a focus on web standards while providing a highly efficient reactive programming model.

npm install maverick.js
INSTALL
IMPORT
SIG · MAVERICK.JS
M
maverick.js
web-frameworkjavascriptv0.43.2
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

signal
✓ import { signal } from '@maverick-js/signals';
✗ const signal = require('@maverick-js/signals').signal;
The `signal` primitive is the cornerstone of reactivity, creating an observable value. ESM-only for modern usage.
computed
✓ import { computed } from '@maverick-js/signals';
✗ import * as Maverick from '@maverick-js/signals'; const myComputed = Maverick.computed(...);
Used to create derived reactive values that only re-evaluate when their dependencies change. Prefer named imports.
effect
✓ import { effect, onDispose } from '@maverick-js/signals';
✗ import { Effect } from '@maverick-js/signals';
`effect` runs side effects reactively. `onDispose` is used for cleanup in reactive scopes.

Demonstrates creating a reactive Web Component using `@maverick-js/signals` to manage and display an incrementing counter, including proper lifecycle cleanup.

import { signal, effect, onDispose } from '@maverick-js/signals'; // A basic custom element definition using the reactive core class MyReactiveCounter extends HTMLElement { private count = signal(0); private disposeEffect: Function | undefined; constructor() { super(); this.attachShadow({ mode: 'open' }); this.shadowRoot!.innerHTML = ` <style> :host { display: block; padding: 10px; border: 1px solid #ccc; } button { padding: 8px 12px; cursor: pointer; } span { margin-left: 10px; font-weight: bold; } </style> <button>Increment</button> <span>Count: 0</span> `; const button = this.shadowRoot!.querySelector('button'); const span = this.shadowRoot!.querySelector('span'); button?.addEventListener('click', () => { this.count.set(this.count() + 1); }); // Establish a reactive effect to update the DOM this.disposeEffect = effect(() => { if (span) { span.textContent = `Count: ${this.count()}`; } }); } connectedCallback() { // Re-establish effects if the element is re-connected, though often not needed for simple cases // The effect in constructor runs immediately and will be alive as long as instance is alive. } disconnectedCallback() { // Clean up the reactive effect when the element is removed from the DOM if (this.disposeEffect) { this.disposeEffect(); } } } customElements.define('my-reactive-counter', MyReactiveCounter); // To use this in an HTML file: // <my-reactive-counter></my-reactive-counter>
Debug
Known issues
gotchaWhen working with signals, directly assigning a new value to the signal function (e.g., `mySignal = 10;`) will break reactivity. Always use the `.set()` method (e.g., `mySignal.set(10);`) or `.update()` for derived values.
fix
Access and update signal values via `signal()` for reading and `signal.set(newValue)` or `signal.update(prev => ...)` for writing.
affects: >=0.1.0
gotchaEffects in `@maverick-js/signals` are batched by default and run on the microtask queue. If you need to force an immediate re-evaluation (e.g., for testing or specific timing-critical updates), you can call the `tick()` function.
fix
For synchronous updates, `import { tick } from '@maverick-js/signals'; tick();`. Otherwise, rely on the default microtask scheduling.
affects: >=0.1.0
gotchaThe `maverick.js` project has a similar name to an older, unrelated Java MVC framework and a historical JavaScript MVC framework. Ensure you are referencing the `@maverick-js` scoped npm packages for the modern UI framework.
fix
Always use `@maverick-js/signals`, `@maverick-js/elemental`, or `@maverick-js/maverick` for imports and documentation. Double-check npm package names.
affects: All versions
Errors
Common errors & fixes
TypeError: Cannot read properties of undefined (reading 'set')
Attempting to call `.set()` on a non-signal variable or a signal that hasn't been properly initialized or is out of scope.
fix
Verify that the variable `signal` is correctly imported and instantiated with `const mySignal = signal(initialValue);` and is accessible in the current scope.
ReferenceError: h is not defined
When using JSX with `@maverick-js/elemental` or similar, the JSX factory function (`h` or `createElement`) is not correctly configured in your build setup (e.g., TypeScript `tsconfig.json` or Babel/Vite configuration).
fix
Ensure your `tsconfig.json` has `"jsx": "react-jsx"` or `"jsxFactory": "h"` and that your bundler/compiler is set up to transpile JSX using the appropriate factory function for Maverick.js/Elemental.
Upgrade
Version history
0.43.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
maverick.js — npm install maverick.js · libregistry