暂无描述

Caleb Porzio 19ec13d858 wip 5 年之前
dist 3af35fdc1e init 5 年之前
src 89acd500d6 init 5 年之前
test 89acd500d6 init 5 年之前
.gitignore 89acd500d6 init 5 年之前
README.md 19ec13d858 wip 5 年之前
babel.config.js 89acd500d6 init 5 年之前
index.html 89acd500d6 init 5 年之前
jest.config.js 89acd500d6 init 5 年之前
package-lock.json 89acd500d6 init 5 年之前
package.json 89acd500d6 init 5 年之前
webpack.mix.js 3af35fdc1e init 5 年之前

README.md

Minimal JS

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