mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
fix docs
This commit is contained in:
parent
cd3e690e57
commit
ca42fbff6f
@ -10,6 +10,7 @@ Light weight templates for [React](http://facebook.github.io/react/index.html).
|
|||||||
* Very good separation of presentation and logic. Almost no HTML within the component file
|
* Very good separation of presentation and logic. Almost no HTML within the component file
|
||||||
* Declarative coding for presentation. HTML that you write and inspect look similar
|
* Declarative 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
|
||||||
|
* Supports AMD, CommonJS and globals
|
||||||
|
|
||||||
## 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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user