Commit graph

12 commits

Author SHA1 Message Date
pelonpelon
b48f8bf79c Docs: mithril.component.md - Recommended changes
These changes make the the text clearer to me. I did not want to change the voice of the text, but I tried to clear out some verbosity and improve consistency. I did my best not to interfere with the logic of the prose.

This document seems written to stand on its own, so I recommend the following changes:

- a general explanation of the args param as in `controller: function(args) {` and `view: function(ctrl, args) { ...` (when first used, well before the signature)
- a specific explanation of {data: args} in m.request() (mithril.request.md could use the same treatment)
- an explanation of the extras param as in `controller: function(args, extras) {` and `view: function(ctrl, args, extras) { ...`
- the term *rollback* should be explained or replaced
- caveat #3/#4: Should *root element* be changed to *top-most element* so as not to be confused with the element the component is mounted on ?
- in testing, explain why the first param to view is `null`

I hope you can find some of this useful.
2015-04-29 12:39:10 -05:00
pelonpelon
9d20a7cd8a Update mithril.component.md 2015-04-29 11:57:51 -05:00
pelonpelon
9c6cbab43e Update mithril.component.md
- The term *rollback* should be explained or replaced
- caveat #3/#4: Should *root element* be changed to *top-most element* so as not to be confused with the element the component is mounted on ?
2015-04-29 11:50:07 -05:00
pelonpelon
62e38287f7 Docs: mithril.component.m - Recommended changes
These changes make the the text clearer to me. I did not want to change the voice of the text, but I tried to clear out some verbosity and improve consistency. I did my best not to interfere with the logic of the prose.

This document seems written to stand on its own, so I recommend the following additions:

- a general explanation of the args param as in `controller: function(args) {` and `view: function(ctrl, args) { ...`
- a specific explanation of how {data: args} in m.request() becomes url parameters (mithril.request.md could use the same treatment)
- an explanation of the extras param as in `controller: function(args, extras) {` and `view: function(ctrl, args, extras) { ...`
2015-04-28 23:26:18 -05:00
Leo Horie
5ec440da21 add more caveats to docs 2015-04-28 16:23:38 -04:00
Leo Horie
3137b63b12 add docs about infinite loop pitfall 2015-04-21 21:45:21 -04:00
Leo Horie
c9be4b30ce improve docs about redrawing 2015-04-20 22:16:27 -04:00
Arthur Clemens
b3411f9509 Typo: redundant parens 2015-04-15 00:46:56 +02:00
Leo Horie
6a9bfdca88 improve docs 2015-04-10 22:27:50 -04:00
Leo Horie
9e8dc6998d rework api 2015-04-09 22:44:45 -04:00
Leo Horie
d5619d412e changes in the docs: rename modules to components, change idiomatic controller and view usage 2015-04-06 22:41:38 -04:00
Leo Horie
0addce57ba docs for m.component and m.mount 2015-04-03 13:31:20 -04:00