More docs

This commit is contained in:
amitk 2014-11-16 01:28:22 +02:00
parent 04a4b135fa
commit d4608fe8dc
1 changed files with 3 additions and 1 deletions

View File

@ -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
* Easy syntax. Similar to HTML. All IDEs recognize this format
[TOC]
## 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.
###### Basic concepts for react templates:
###### Basic concepts for react templates
* Any valid HTML is a template (and comments)
* {} to identify JS expression
* rt-if