https://github.com/arazjs/core
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.
https://github.com/arazjs/core
framework javascript typescript
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/arazjs/core
- Owner: arazjs
- License: mit
- Created: 2023-08-03T10:08:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T12:22:58.000Z (over 1 year ago)
- Last Synced: 2025-03-09T03:17:30.326Z (about 1 year ago)
- Topics: framework, javascript, typescript
- Language: TypeScript
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 `` element:
```
mount({
$node: button,
$target: document.body,
});
```
Araz.js includes a simple router that allows
Generated by [BlackboxAI](https://www.useblackbox.ai)