Skip to content

Commit 19ec13d

Browse files
committed
wip
1 parent 3af35fd commit 19ec13d

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
## Xen JS
1+
## Minimal JS
22

3-
### Installation
4-
* For now, you can copy this link
3+
### Install
4+
`<script src="https://cdn.jsdelivr.net/gh/minimaljs/minimal/dist/minimal.min.js"></script>`
5+
6+
### Use
7+
```
8+
<div x-data="{ show: true }">
9+
<button x-on:click="$data.show = ! $data.show">toggle</button>
10+
11+
<div x-bind:class="{ 'hidden': ! $data.show }">...</div>
12+
</div>
13+
```
14+
15+
You can bind expressions to any attribute using `x-bind`, and you can run expressions on any event using `x-on`.
16+
17+
The data is "reactive", when some data updates, only the expressions conscerned with it will.
18+
19+
### Goals
20+
* Get rid of `$data.show` and just use `show`

0 commit comments

Comments
 (0)