diff --git a/docs/change-log.md b/docs/change-log.md index 2698ad9d..ea2ee425 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -13,7 +13,9 @@ If you are migrating, consider using the [mithril-codemods](https://www.npmjs.co - [`m.prop` removed](#mprop-removed) - [`m.component` removed](#mcomponent-removed) - [`config` function](#config-function) -- [Cancelling redraw from event handlers](#cancelling-redraw-from-event-handlers) +- [Changes in redraw behaviour](#changes-in-redraw-behaviour) + - [No more redraw locks](#no-more-redraw-locks) + - [Cancelling redraw from event handlers](#cancelling-redraw-from-event-handlers) - [Component `controller` function](#component-controller-function) - [Component arguments](#component-arguments) - [`view()` parameters](#view-parameters) @@ -118,7 +120,15 @@ If available the DOM-Element of the vnode can be accessed at `vnode.dom`. --- -## Cancelling redraw from event handlers +## Changes in redraw behaviour + +Mithril's rendering engine still operates on the basis of semi-automated global redraws, but some APIs and behaviours differ: + +### No more redraw locks + +In v0.2.x, Mithril allowed 'redraw locks' which temporarily prevented blocked draw logic: by default, `m.request` would lock the draw loop on execution and unlock when all pending requests had resolved - the same behaviour could be invoked manually using `m.startComputation()` and `m.endComputation()`. The latter APIs and the associated behaviour has been removed in v1.x. Redraw locking can lead to buggy UIs: the concerns of one part of the application should not be allowed to prevent other parts of the view from updating to reflect change. + +### Cancelling redraw from event handlers `m.mount()` and `m.route()` still automatically redraw after a DOM event handler runs. Cancelling these redraws from within your event handlers is now done by setting the `redraw` property on the passed-in event object to `false`. diff --git a/docs/route.md b/docs/route.md index 9089773e..234bd678 100644 --- a/docs/route.md +++ b/docs/route.md @@ -257,7 +257,7 @@ m.route(document.body, "/edit/pictures/image.jpg", { --- -### Changing route prefix +### Changing router prefix The router prefix is a fragment of the URL that dictates the underlying [strategy](routing-strategies.md) used by the router.