1
0
mirror of https://github.com/bobwen-dev/react-templates synced 2025-04-12 00:56:39 +02:00

Update README.md

This commit is contained in:
Ido 2014-11-25 18:02:13 +02:00
parent 51061370d6
commit 9aaf7b9c99

View File

@ -11,6 +11,10 @@ Light weight templates for [React](http://facebook.github.io/react/index.html).
## How does it work ## How does it work
React templates compiles a *.rt file (react template file - extended HTML format) into a JavaScript file. This file - which currently utilizes RequireJS format - returns a function. This function, when invoked, returns a virtual React DOM (based on React.DOM elements and custom user components). A common use case would be that a regular React component would require a JavaScript file generated from a template, and then perform `func.apply(this)`, causing the template to have that component as its context. React templates compiles a *.rt file (react template file - extended HTML format) into a JavaScript file. This file - which currently utilizes RequireJS format - returns a function. This function, when invoked, returns a virtual React DOM (based on React.DOM elements and custom user components). A common use case would be that a regular React component would require a JavaScript file generated from a template, and then perform `func.apply(this)`, causing the template to have that component as its context.
## playground
http://wix.github.io/react-templates/
###### 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