%x{ if (typeof global === 'undefined') global = window; if (typeof React === 'undefined') { if (require) global.React = require('react'); } if (typeof ReactDOM === 'undefined') { if (require) global.ReactDOM = require('react-dom'); } if (typeof shallowCompare === 'undefined') { if ('addons' in React && 'shallowCompare' in React.addons) global.shallowCompare = React.addons.shallowCompare; else if (require) global.shallowCompare('react-addons-shallow-compare'); } } module React end module ReactDOM def self.render(element, container, &block) $$.ReactDOM.render(element, container, &block) end end module ReactDOMServer def self.renderToString(element) $$.ReactDOMServer.renderToString(element) end def self.renderToStaticMarkup(element) $$.ReactDOMServer.renderToStaticMarkup(element) end end