From 70cad6d5b338f4e9c214efc20c5c66e5a29a8b0a Mon Sep 17 00:00:00 2001 From: Pat Cavit Date: Wed, 4 May 2016 11:18:13 -0700 Subject: [PATCH] Added lifecycle method descriptions --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 03ac9747..81e12ca8 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ Mithril's virtual DOM engine is now less than 400 lines of well organized code a Mithril's `config` method is now replaced by several lifecycle methods to improve separation of concerns and allow better control over animations. +- **`oninit`** Run once before vnode creation +- **`oncreate`** Run after the DOM element is created +- **`onupdate`** Run after vnode is diffed +- **`onremove`** Run before DOM removal +- **`onbeforeremove`** Run before DOM removal + ## Robustness There are over 1800 assertions in the test suite, and tests cover even difficult-to-test things like `location.href`, `element.innerHTML` and `XMLHttpRequest` usage.