Skip to main content

Tutorial Intro

Introduction

DeshiJS is a minimalistic JavaScript framework designed to add dynamic behavior to your web projects with ease. It focuses on easy integration, minimalistic design, and dynamic state management.

Installation

Using npx

npx degit DeshiJS/DeshiJS

Using CDN

<script src="//unpkg.com/deshijs" defer></script>

Getting Started

Here’s a basic example to get you started with DeshiJS.

HTML (index.html)

Eexample

index.html
<div id="root"></div>

<template app>
<button
$text="{counter} {counter <= 1 ? 'time' : 'times'}"
@click="incrementCounter()"
></button>
</template>

<script type="module">
import deshi from "//unpkg.com/deshijs";
deshi.init();
signal = {
counter: 0,
incrementCounter: function () {
this.counter++;
},
};
</script>

JavaScript (app.js)

Eexample

app.js
signal = {
counter: 0,
title : "DeshiJS is awesome!"
content : "DeshiJS is a minimalistic JavaScript framework"
url : "https://github.com/DeshiJS/DeshiJS"
isActive : true
}