araz v3.0.3
Araz.js
Araz.js is a mini framework that provides a simple and intuitive API for building web applications. It is inspired by popular frameworks like React and Vue.js, but with a focus on simplicity and ease of use.
Installation
To install Araz.js, simply run the following command in your terminal:
npm install arazUsage
Araz.js is a component-based framework, which means that your application is built by composing reusable components. Each component is a self-contained unit that has its own state and logic.
To create a component, you can use the el() function. This function takes an object with three properties: $tag, $attrs, and $children.
$tagis the HTML tag name of the component.$attrsis an object containing the attributes of the component.$childrenis an array of child components.
For example, the following code creates a simple button component:
const button = el(
'button',
{
type: 'button',
class: 'btn btn-primary',
},
'Click me',
);Once you have created a component, you can mount it to the DOM using the mount() function. This function takes two arguments: the component to be mounted, and the target element in the DOM.
For example, the following code mounts the button component to the <body> element:
mount({
$node: button,
$target: document.body,
});Araz.js includes a simple router that allows
Generated by BlackboxAI
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago