Attributes
Includes Deno configuration
Repository
Current version released
a year ago
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
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
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 | ✓ |