Merge remote-tracking branch 'origin/rewrite' into rewrite
This commit is contained in:
commit
fd4284f5a2
2 changed files with 2 additions and 2 deletions
|
|
@ -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.
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
--------------- | --------------------- | ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue