Plugins You can find out about all the publicly available Grails plugins.

React Asset-Pipeline Plugin

1 vote
compile "org.grails.plugins:react-asset-pipeline:2.0.0"

 Documentation  Source  Issues


Provides react support for Asset-Pipeline.


mavenRepo ""

to your repositories block in BuildConfig and then add

compile ':react-asset-pipeline:2.0.0'

to the plugins block



If you just want react assets in your app you can either require react (for only react.js) or react-with-jsx (for browser side jsx compilation). e.g.
//= require react-with-jsx

Template Precompilation

The real power of this plugin is the server side precompilation of JSX templates. Put your jsx templates in grails-app/assets/javascripts folder (or subfolders) and reference them with the provided tag. As you may already know from asset-pipeline plugin, you can build template packages by referencing files like in javascript. e.g.: in grails-app/assets/javascript/templates/pager.jsx
//= require pager/pager.jsx
//= require pager/pager-next-button.jsx
//= require pager/pager-prev-button.jsx