preact-ui

Enforce MVVM structure and signal-driven state management in Preact components.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/prachwal/preact-ui --skill preact-ui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preact-ui
Source: https://github.com/prachwal/preact-ui/tree/main
Command: npx skills add https://github.com/prachwal/preact-ui --skill preact-ui

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building Preact pages and component systems can become chaotic without consistent layering, signal management, accessibility guardrails, and testing guidance, so this skill provides a single reference for MVVM structuring, signal usage, routing, forms, SCSS, and test practices.

Core Features & Use Cases

  • MVVM architecture: Model modules stay pure, ViewModels expose signals/computed/actions, and Views remain rendering-only, which keeps business logic decoupled from DOM concerns.
  • Signal-first state: Signals, computed values, effects, and batching are prescribed for both module-level stores and component-local hooks to ensure fine-grained updates and predictable side effects.
  • Workflow guidance: Layouts, routing (via preact-iso or preact-router), form validation, accessibility checkpoints, SCSS conventions, and testing strategies for async flows are all documented for marketing pages, dashboards, forms, and interactive tools.
  • References: Linked markdown reference files detail MVVM patterns, state management, signals, layout, forms, routing, accessibility, and testing techniques for deeper study.

Quick Start

Use the preact-ui guidance to structure a new MVVM-aligned Preact page, wiring models, viewmodels, signals, and views before writing any rendering logic.

Frequently Asked Questions about preact-ui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Preact components using MVVM and signals?

Structure Preact components with MVVM by keeping Model modules pure, exposing signals, computed values, and actions through ViewModels, and restricting Views to rendering logic only. This decouples business logic from DOM concerns and ensures fine-grained signal-driven state updates.

What is the best way to manage state in Preact applications?

The best way to manage state in Preact is using a signal-first approach. Utilize signals, computed values, effects, and batching for both module-level stores and component-local hooks to achieve fine-grained updates and predictable side effects.

How do I set up routing and accessibility in a Preact app?

Set up routing and accessibility in a Preact app by using preact-iso or preact-router for navigation and adhering to documented accessibility checkpoints. This ensures marketing pages, dashboards, and interactive tools remain navigable and compliant.

Does this MVVM Preact guidance cover SCSS and form validation?

Yes, this MVVM Preact guidance covers SCSS conventions and form validation. It provides workflow guidance for styling integration and form validation alongside routing, accessibility checkpoints, and testing strategies for asynchronous flows.

Why should I separate ViewModels from Views in Preact?

Separate ViewModels from Views in Preact to keep business logic decoupled from DOM rendering concerns. ViewModels expose signals, computed values, and actions, while Views remain rendering-only, ensuring predictable side effects and easier testing.

Can I use preact-iso and preact-router with signal-driven state management?

Yes, you can use preact-iso and preact-router with signal-driven state management. The guidance prescribes signals, computed values, and batching for module-level stores and component-local hooks when compiling Preact applications with these routing tools.