Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more

Jito

What is Jito?

Jito is a web component framework with Data Binding, Template Engine, Virtual DOM and routing.

You can experience single page application development with just a web browser.

She support JavaScript and TypeScript for Deno.

Document

Japanese

First Example

Please save the following code as example.html and try opening it in your web browser. A counter that counts up every time you click.

<!DOCTYPE html>
<meta charset="UTF-8">
<body></body>
<script type="module">
  import { watch, mount } from 'https://cdn.jsdelivr.net/gh/ittedev/jito@1.3.4/jito.js'

  let state = watch({
    count: 0
  })

  let html = `
    Counter: {| count |}
    <button onclick="count++">Add</button>
  `

  mount(document.body, html, state)
</script>

Examples

Glitch Examples

Import

Jito use ES Modules.

From a local file

<script type="module">
  import { ... } from './jito.js'
  ...
</script>

From CDN

From jsDelivr.

<script type="module">
  import { ... } from 'https://cdn.jsdelivr.net/gh/ittedev/jito@1.3.4/jito.js'
  ...
</script>

For Deno

import { ... } from 'https://deno.land/x/jito@1.3.4/mod.ts'

For Node.js

Install:

npm i jito

Import:

import { ... } from 'jito'

Functions

API Functions Browser Server
Data Binding watch, unwatch, reach, unreach, change, lock, unlock βœ“ βœ“
Virtual DOM load, patch βœ“
Template Engine parse, evaluate, pickup βœ“ βœ“
Web Components compact, mount, define, elementize βœ“
Routing walk βœ“