From a671da246d5bb3f3d1077547aa962c5d1a9cce65 Mon Sep 17 00:00:00 2001 From: hqproto <66336138+hqproto@users.noreply.github.com> Date: Mon, 11 Jan 2021 11:42:28 -0800 Subject: [PATCH] Update standalone usage --- docs/render.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/render.md b/docs/render.md index 36516d83..1e4b4dd5 100644 --- a/docs/render.md +++ b/docs/render.md @@ -72,3 +72,5 @@ Another difference is that `m.render` method expects a [vnode](vnodes.md) (or a The `m.render` module is similar in scope to view libraries like Knockout, React and Vue. It implements a virtual DOM diffing engine with a modern search space reduction algorithm and DOM recycling, which translate to top-of-class performance, both in terms of initial page load and re-rendering. It has no dependencies on other parts of Mithril aside from normalization exposed via `require("mithril/render/vnode")` and can be used as a standalone library. Despite being relatively small, the render module is fully functional and self-sufficient. It supports everything you might expect: SVG, custom elements, and all valid attributes and events - without any weird case-sensitive edge cases or exceptions. Of course, it also fully supports [components](components.md) and [lifecycle methods](lifecycle-methods.md). + +When using `m.render` as a standalone module, it may be useful to also import the [`hyperscript function`](hyperscript.md) to create the vnodes to be rendered.