Skip to content

amirrr1987/araz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 araz

Usage

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.

  • $tag is the HTML tag name of the component.
  • $attrs is an object containing the attributes of the component.
  • $children is 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

About

mini framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published