From ce93bdbb793eb64e9f4c49efdb9e607a954a37df Mon Sep 17 00:00:00 2001 From: maks feltrin Date: Sat, 22 Oct 2016 04:04:47 +0200 Subject: [PATCH] rename ctrl to state I am not sure you agree, but i find the name `state` a bit less confusing that the name `ctrl` used in v 0.2.x. thank you and kind regards --- docs/v1.x-migration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/v1.x-migration.md b/docs/v1.x-migration.md index 3bbe31a7..ca1a1efb 100644 --- a/docs/v1.x-migration.md +++ b/docs/v1.x-migration.md @@ -134,15 +134,15 @@ m.mount(document.body, { m.mount(document.body, { oninit : function(vnode) { - var ctrl = this; // this is bound to vnode.state by default + var state = this; // this is bound to vnode.state by default - ctrl.fooga = 1; + state.fooga = 1; }, view : function(vnode) { - var ctrl = this; // this is bound to vnode.state by default + var state = this; // this is bound to vnode.state by default - return m("p", ctrl.fooga); + return m("p", state.fooga); } }); ```