More docs
This commit is contained in:
parent
04a4b135fa
commit
d4608fe8dc
|
@ -8,10 +8,12 @@ Light weight templates for react. Reasons that we love it:
|
||||||
* Declerative coding for presentation. HTML that you write and inspect look similar
|
* Declerative coding for presentation. HTML that you write and inspect look similar
|
||||||
* Easy syntax. Similar to HTML. All IDEs recognize this format
|
* Easy syntax. Similar to HTML. All IDEs recognize this format
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
## How does it work
|
## How does it work
|
||||||
React templates compiles a *.rt file (react template - extended HTML format) into a javascript file. Currently, this file supports requirejs format, that will return a function. This function, when applied, will return a virtual react DOM (based on React.DOM elements and user custom components). A common use case would be that a React component would require a JS file generated by a template, and then call `func.apply(this)`, causing the template to have the component as its context.
|
React templates compiles a *.rt file (react template - extended HTML format) into a javascript file. Currently, this file supports requirejs format, that will return a function. This function, when applied, will return a virtual react DOM (based on React.DOM elements and user custom components). A common use case would be that a React component would require a JS file generated by a template, and then call `func.apply(this)`, causing the template to have the component as its context.
|
||||||
|
|
||||||
###### Basic concepts for react templates:
|
###### Basic concepts for react templates
|
||||||
* Any valid HTML is a template (and comments)
|
* Any valid HTML is a template (and comments)
|
||||||
* {} to identify JS expression
|
* {} to identify JS expression
|
||||||
* rt-if
|
* rt-if
|
||||||
|
|
Loading…
Reference in New Issue