all repos — h3 @ c310cd0dea3b30ec47b42678e77dbd726bd890f3

A tiny, extremely minimalist JavaScript microframework.

Updates.
h3rald h3rald@h3rald.com
Sun, 19 Apr 2020 18:22:20 +0200
commit

c310cd0dea3b30ec47b42678e77dbd726bd890f3

parent

aefba437be4cdf00cf1348c0fb84d41aebbde5c7

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

jump to
M docs/example/assets/js/h3.jsdocs/example/assets/js/h3.js

@@ -583,6 +583,7 @@ }

const vnode = this.routes[this.route.def](); this.element.appendChild(vnode.render()); this.setRedraw(vnode); + this.store.dispatch("$redraw", this.route); this.store.dispatch("$navigation", this.route); }; processPath();
M docs/js/h3.jsdocs/js/h3.js

@@ -583,6 +583,7 @@ }

const vnode = this.routes[this.route.def](); this.element.appendChild(vnode.render()); this.setRedraw(vnode); + this.store.dispatch("$redraw", this.route); this.store.dispatch("$navigation", this.route); }; processPath();
M docs/md/api.mddocs/md/api.md

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

## API -The core of the H3 API is comprised of the following six methods and two properties (plus a bunch of system messages). +The core of the H3 API is comprised of the following six methods and two properties. ### h3.equal(a: any, b: any)

@@ -62,7 +62,7 @@ <td data-label="Type">Function</td>

<td data-label="Description">An optional function to be executed after the application is first rendered.</td> </tr> </tbody> -</table> | +</table> Routing paths can contain named parts like `:name` or `:id` which will populate the `parts` property of the current route.

@@ -90,7 +90,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. -Subscriptions should be typically managed in modules rather than in componnents: a component gets rendered several times and subscriptions *must* be properly cleaned up to avoid memory leaks. +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. Example:
M h3.jsh3.js

@@ -583,6 +583,7 @@ }

const vnode = this.routes[this.route.def](); this.element.appendChild(vnode.render()); this.setRedraw(vnode); + this.store.dispatch("$redraw", this.route); this.store.dispatch("$navigation", this.route); }; processPath();