Added lifecycle method descriptions
This commit is contained in:
parent
d61a6169ea
commit
70cad6d5b3
1 changed files with 6 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue