Document removal of sync redraw (#1447)
This commit is contained in:
parent
c551ffb206
commit
a07a662a82
1 changed files with 19 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
|||
- [`xlink` namespace required](#xlink-namespace-required)
|
||||
- [Nested arrays in views](#nested-arrays-in-views)
|
||||
- [`vnode` equality checks](#vnode-equality-checks)
|
||||
- [Synchronous redraw removed](#synchronous-redraw-removed)
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -543,3 +544,21 @@ Arrays now represent [fragments](fragment.md), which are structurally significan
|
|||
## `vnode` equality checks
|
||||
|
||||
If a vnode is strictly equal to the vnode occupying its place in the last draw, v1.x will skip that part of the tree without checking for mutations or triggering any lifecycle methods in the subtree. The component documentation contains [more detail on this issue](components.md#avoid-creating-component-instances-outside-views).
|
||||
|
||||
---
|
||||
|
||||
## Synchronous redraw removed
|
||||
|
||||
In v0.2.x it was possible to force mithril to redraw immediately by passing a truthy value to `m.redraw()`. This behavior complicated usage of `m.redraw()` and caused some hard-to-reason about issues and has been removed.
|
||||
|
||||
### `v0.2.x`
|
||||
|
||||
```javascript
|
||||
m.redraw(true); // redraws immediately & synchronously
|
||||
```
|
||||
|
||||
### `v1.x`
|
||||
|
||||
```javascript
|
||||
m.redraw(); // schedules a redraw on the next requestAnimationFrame tick
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue