Sha256: 150ccb7904d5999b7d6a0f7c67e6a6357340c0c73dbf6625746a4dbc0ebba82f
Contents?: true
Size: 819 Bytes
Versions: 9
Compression:
Stored size: 819 Bytes
Contents
module Hyperstack module Component module Server def self.render_to_string(element) if !(`typeof ReactDOMServer === 'undefined'`) Hyperstack::Internal::Component::RenderingContext.build { `ReactDOMServer.renderToString(#{element.to_n})` } # v0.15+ else raise "renderToString is not defined. In React >= v15 you must import it with ReactDOMServer" end end def self.render_to_static_markup(element) if !(`typeof ReactDOMServer === 'undefined'`) Hyperstack::Internal::Component::RenderingContext.build { `ReactDOMServer.renderToStaticMarkup(#{element.to_n})` } # v0.15+ else raise "renderToStaticMarkup is not defined. In React >= v15 you must import it with ReactDOMServer" end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems