Getting Started
Cradova is a lightweight, reactive UI framework designed for building modern web applications with simplicity and performance.
Inspired from principles of SolidJS and designs of React and Mithril.js, Cradova provides a declarative API, fine-grained reactivity, and efficient DOM updates.
Installation
npm install cradova
Docs
Complete documentation for building with the Cradova framework.
- Framework Overview - Core concepts and when to use Cradova
- Getting Started - Quick start guide
- conventions - Function vs arrow function rules
- state - Signal and hooks deep dive
- component - Creating and using components
- routing - Page and Router configuration
- control flow - Conditional rendering ($if, $ifelse, $switch, $case, loop)
- performance - List virtualization, optimization
- example - Complete code examples
- production - Real-world patterns and deployment
invoke and fragment Utilities
invoke(component, ...args)
Render a component with arguments.
import { invoke } from "cradova";
const UserCard = function (ctx, user) {
return div(user.name);
};
invoke(UserCard, { name: "Alice" });
fragment(...children)
Creates a document fragment for grouping elements without adding extra DOM nodes.
frag(div("Child 1"), div("Child 2"));
Conclusion
Cradova provides a simple yet powerful API for building reactive web applications. With its fine-grained reactivity model, efficient DOM updates, and familiar component-based architecture, Cradova enables developers to create performant applications with minimal overhead.
For more examples and advanced usage patterns, explore the sample application included in the documentation.