From ce7cb8893ddb782c2cf2fdea8380ad81b12889d4 Mon Sep 17 00:00:00 2001 From: Geoff Doty Date: Sat, 29 Mar 2025 15:25:01 -0400 Subject: [PATCH] readme tweak --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 33a365a..b46ce6f 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,18 @@ With **Mite** it is just one file and go... ## Getting Started ### Key Features -- **Reactive Data Binding**: Bind data to the DOM using `{{ }}` syntax, and Mite will automatically update the DOM when the data changes. +- **Reactive Two-Way Data Binding**: Bind data to the DOM using `{ }` syntax, and Mite will automatically update the DOM when the data changes. - **Directives**: - `m-if`: Conditionally show or hide elements based on a truthy/falsy expression. - `m-each`: Iterate over arrays to render lists dynamically. - - `:`-prefixed attributes (e.g., `:value`): Bind data to element attributes. - **Event Handling**: Bind events to methods using `@event` syntax (e.g., `@click`). - **Lightweight**: Mite is a single class with no external dependencies, making it easy to integrate into any project. ## Usage ```html -
- +
``` -Any tag property that starts with a `@` is an event, so you can do `@click=""`; +### Options +- `selector`: A CSS selector (string) targets root DOM element (required). +- `opts`: An options object with properties: + - `data` (Object): Reactive data for the app. Changes to `data` properties trigger DOM updates. + - anything else you want, just a POJO ## Test