NAME
Template::Plugin::React - Plugin for Facebook React
DESCRIPTION
This is a Template Toolkit plugin to render React components. The current version is 0.002
.
REQUIREMENTS
Mozilla's SpiderMonkey and SWIG[SWIG] must be installed. SpiderMonkey 24 was used to build this module; if you use a different version, your mileage may vary. The Makefile.PL
script uses js-config
to learn about the compilation flags to use, so make sure that is in your PATH
.
USAGE
This plugin only exposes a single function: React.render(component, data)
. component
must be a string representing the component name, and data
, if passed, must be a hash ref representing the data to provide to the component during rendering. JavaScript exceptions are propagated up and sent to an invocation of die
.
[% USE React %]
[% React.render('Component', data) %]