Update vnodes.md

This commit is contained in:
Claudia Meadows 2024-08-31 22:07:21 -07:00
parent 1b0899b469
commit 3a633ce99c
No known key found for this signature in database
GPG key ID: C86B594396786760

View file

@ -116,7 +116,7 @@ When creating libraries that emit vnodes, you should use this module instead of
Vnodes are supposed to represent the state of the DOM at a certain point in time. Mithril.js's rendering engine assumes a reused vnode is unchanged, so modifying a vnode that was used in a previous render will result in undefined behavior.
It is possible to reuse vnodes in place to prevent a diff, but it's preferable to use the [`onbeforeupdate`](lifecycle.md#onbeforeupdate).
It is possible to reuse vnodes in place to prevent a diff, but it's preferable to use the [`onbeforeupdate`](lifecycle-methods.md#onbeforeupdate).
#### Avoid passing model data directly to components via attributes
@ -174,4 +174,4 @@ var BetterListComponent = {
}))
}
}
```
```