beef up docs and defrag setup flow

This commit is contained in:
Leo Horie 2017-01-08 10:53:54 -05:00
parent f0d6b0d58b
commit 7c00aad19c
4 changed files with 246 additions and 74 deletions

View file

@ -14,6 +14,7 @@
- [Keys](#keys)
- [SVG and MathML](#svg-and-mathml)
- [Making templates dynamic](#making-templates-dynamic)
- [Converting HTML](#converting-html)
- [Avoid anti-patterns](#avoid-anti-patterns)
---
@ -345,6 +346,14 @@ You cannot use Javascript statements such as `if` or `for` within Javascript exp
---
### Converting HTML
In Mithril, well-formed HTML is valid JSX. Little effort other than copy-pasting is required to integrate an independently produced HTML file into a project using JSX.
When using hyperscript, it's necessary to convert HTML to hyperscript syntax before the code can be run. To facilitate this, you can [use the HTML-to-Mithril-template converter](http://arthurclemens.github.io/mithril-template-converter/index.html).
---
### Avoid Anti-patterns
Although Mithril is flexible, some code patterns are discouraged: