From 5a786009c58adbd0b96dafa504d2de6f1869cfcd Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Wed, 22 Apr 2015 21:18:41 -0400 Subject: [PATCH] remove references to m.module --- docs/components.md | 2 +- docs/practices.md | 2 +- docs/routing.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/components.md b/docs/components.md index eb2e3852..e98224f8 100644 --- a/docs/components.md +++ b/docs/components.md @@ -248,7 +248,7 @@ var ContactList = { } } -m.module(document.body, ContactsWidget) +m.mount(document.body, ContactsWidget) ``` In this iteration, both the `ContactForm` and `ContactList` components are now children of the `ContactsWidget` component and they appear simultaneously on the same page. diff --git a/docs/practices.md b/docs/practices.md index 71545a82..682a84cc 100644 --- a/docs/practices.md +++ b/docs/practices.md @@ -72,7 +72,7 @@ That organization pattern needlessly ties unrelated aspects of the application t `m.redraw` is a method that allows you to render a template outside the scope of Mithril's auto-redrawing system. -Calling this method while using `m.module` or `m.route` should only be done if you have recurring asynchronous view updates (i.e. something that uses setInterval). +Calling this method while using `m.mount` or `m.route` should only be done if you have recurring asynchronous view updates (i.e. something that uses setInterval). If you're integrating other non-recurring services (e.g. calling setTimeout), you should use [`m.startComputation` / `m.endComputation`](mithril.computation.md) instead. diff --git a/docs/routing.md b/docs/routing.md index f4aa6fca..da660ea3 100644 --- a/docs/routing.md +++ b/docs/routing.md @@ -58,7 +58,7 @@ This redirects to the URL `http://server/#/dashboard/johndoe` and yields: Above, `dashboard` is a module. It contains `controller` and `view` properties. When the URL matches a route, the respective module's controller is instantiated and passed as a parameter to the view. -In this case, since there's only one route, the app redirects to the default route `"/dashboard/johndoe"` and, under the hood, it calls `m.module(document.body, dashboard)`. +In this case, since there's only one route, the app redirects to the default route `"/dashboard/johndoe"` and, under the hood, it calls `m.mount(document.body, dashboard)`. The string `johndoe` is bound to the `:userID` parameter, which can be retrieved programmatically in the controller via `m.route.param("userID")`.