Document removal of sync redraw (#1447)

This commit is contained in:
Pat Cavit 2016-12-02 12:30:52 -08:00 committed by GitHub
parent c551ffb206
commit a07a662a82

View file

@ -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
```