From 9fe85b3461cf14994adaa26b07a848dff78b1cff Mon Sep 17 00:00:00 2001 From: "Jan-T. Brinkmann" Date: Tue, 20 Sep 2016 21:32:47 +0200 Subject: [PATCH 1/3] fixed broken anchor link in fragment.md "monomorphic objects" linked to `vnodes.md#monomorphic-objects`, however the proper hash currently is `#monomorphic-class` --- docs/fragment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/fragment.md b/docs/fragment.md index 77c2b854..fa04799b 100644 --- a/docs/fragment.md +++ b/docs/fragment.md @@ -45,4 +45,4 @@ m("ul", [ However, Javascript arrays cannot be keyed or hold lifecycle methods. One option would be to create a wrapper element to host the key or lifecycle method, but sometimes it is not desirable to have an extra element (for example in complex table structures). In those cases, a fragment vnode can be used instead. -There are a few benefits that come from using `m.fragment` instead of handwriting a vnode object structure: m.fragment creates [monomorphic objects](vnodes.md#monomorphic-objects), which have better performance characteristics than creating objects dynamically. In addition, using `m.fragment` makes your intentions clear to other developers, and it makes it less likely that you'll mistakenly set attributes on the vnode object itself rather than on its `attrs` map. \ No newline at end of file +There are a few benefits that come from using `m.fragment` instead of handwriting a vnode object structure: m.fragment creates [monomorphic objects](vnodes.md#monomorphic-class), which have better performance characteristics than creating objects dynamically. In addition, using `m.fragment` makes your intentions clear to other developers, and it makes it less likely that you'll mistakenly set attributes on the vnode object itself rather than on its `attrs` map. From 67433a78161d5dad87afb75e69d6369883164708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Yves=20G=C3=A9rardy?= Date: Wed, 21 Sep 2016 04:44:19 +0200 Subject: [PATCH 2/3] Correct the RouteResolver.onmatch() signature (#1327) --- docs/route.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/route.md b/docs/route.md index 30d31a11..c8428b98 100644 --- a/docs/route.md +++ b/docs/route.md @@ -92,7 +92,7 @@ The `onmatch` hook is called when the router needs to find a component to render This method also allows you to asynchronously define what component will be rendered, making it suitable for code splitting and asynchronous module loading. -`routeResolver.onmatch(vnode, resolve)` +`routeResolver.onmatch(resolve, args, requestedPath)` Argument | Type | Description --------------- | --------------------- | --- From 6206bc435ed0aed52857b08cc14f052dbbe39762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Yves=20G=C3=A9rardy?= Date: Wed, 21 Sep 2016 04:46:09 +0200 Subject: [PATCH 3/3] Remove redundant lines that break the examples (#1294) --- render/hyperscript.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/render/hyperscript.js b/render/hyperscript.js index 5a815ebb..12fcf0be 100644 --- a/render/hyperscript.js +++ b/render/hyperscript.js @@ -65,7 +65,4 @@ function hyperscript(selector) { return Vnode(selector, attrs && attrs.key, attrs || {}, Vnode.normalizeChildren(children), undefined, undefined) } -hyperscript.trust = require("./trust") -hyperscript.fragment = require("./fragment") - module.exports = hyperscript