Caleb Porzio 5 年之前
父节点
当前提交
19ec13d858
共有 1 个文件被更改,包括 19 次插入3 次删除
  1. 19 3
      README.md

+ 19 - 3
README.md

@@ -1,4 +1,20 @@
-## Xen JS
+## Minimal JS
 
-### Installation
-* For now, you can copy this link
+### Install
+`<script src="https://cdn.jsdelivr.net/gh/minimaljs/minimal/dist/minimal.min.js"></script>`
+
+### Use
+```
+<div x-data="{ show: true }">
+    <button x-on:click="$data.show = ! $data.show">toggle</button>
+
+    <div x-bind:class="{ 'hidden': ! $data.show }">...</div>
+</div>
+```
+
+You can bind expressions to any attribute using `x-bind`, and you can run expressions on any event using `x-on`.
+
+The data is "reactive", when some data updates, only the expressions conscerned with it will.
+
+### Goals
+* Get rid of `$data.show` and just use `show`