all repos — h3 @ 9ab7e74645a3a53b3fe5affc1cc832e52b976df5

A tiny, extremely minimalist JavaScript microframework.

Minor fixes
Fabio Cevasco h3rald@h3rald.com
Sun, 19 Apr 2020 22:03:36 +0200
commit

9ab7e74645a3a53b3fe5affc1cc832e52b976df5

parent

b0c3dd10fd6007ca91624cab0bf872add684e531

3 files changed, 6 insertions(+), 4 deletions(-)

jump to
M docs/md/api.mddocs/md/api.md

@@ -88,7 +88,7 @@ ```

### h3.on(message: string, handler: function) -Subscribes to the specified messages and executes the specified handler function whenever the message is dispatches. Returns a function that can be used to delete the subscription. +Subscribes to the specified message and executes the specified handler function whenever the message is dispatches. Returns a function that can be used to delete the subscription. Subscriptions should be typically managed in modules rather than in components: a component gets rendered several times and subscriptions *must* be properly cleaned up to avoid memory leaks.
M docs/md/key-concepts.mddocs/md/key-concepts.md

@@ -1,6 +1,6 @@

## Key Concepts -There are essentially four things you need to know about if you want to use H3. +There are just a few things you should know about if you want to use H3. Oh... and a solid understanding of HTML and JavaScript wouldn't hurt either ;)

@@ -53,7 +53,7 @@ ```

### Store -H3 essentially uses something very, *very* similar to [StoreOn](https://github.com/storeon/storeon) for state maagemennt *and* also as a very simple client-side message dispatcher/subscriber. Typically you'll only use the default store created by H3 upon initialization, and you'll use the `h3.dispatch()` and `h3.on()` methods to dispatch and subscribe to actions (messages). +H3 essentially uses something very, *very* similar to [StoreOn](https://github.com/storeon/storeon) for state management *and* also as a very simple client-side message dispatcher/subscriber (seriously, it is virtually the same code as StoreOn). Typically you'll only use the default store created by H3 upon initialization, and you'll use the `h3.dispatch()` and `h3.on()` methods to dispatch and subscribe to actions (messages). The current application state is accessible via the `h3.state` property.
M docs/md/usage.mddocs/md/usage.md

@@ -1,1 +1,3 @@

-## Usage+## Usage + +_Coming soon!_