Template::Plugin::React - Plugin for Facebook React
This is a Template Toolkit plugin to render React components. The current version is 0.008. You must use React version 0.9.0 or higher with this plugin.
0.008
0.9.0
Mozilla's SpiderMonkey and 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.
Makefile.PL
js-config
PATH
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.
React.render(component, data)
component
data
die
[% USE React %] [% React.render('Component', data) %]
To install Template::Plugin::React, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::React
CPAN shell
perl -MCPAN -e shell install Template::Plugin::React
For more information on module installation, please visit the detailed CPAN module installation guide.