Sha256: c4eedda2438cdb71d96275820950a5a60c7c6b4eea3ffcbe75879c023375ec95
Contents?: true
Size: 528 Bytes
Versions: 5
Compression:
Stored size: 528 Bytes
Contents
class React::Rails::ControllerRenderer include React::Rails::ViewHelper include ActionView::Helpers::TagHelper include ActionView::Helpers::TextHelper attr_accessor :output_buffer def initialize(options={}) controller = options[:controller] @__react_component_helper = controller.__react_component_helper end def call(name, options, &block) props = options.fetch(:props, {}) options = options.slice(:data, :tag).merge(prerender: true) react_component(name, props, options, &block) end end
Version data entries
5 entries across 5 versions & 1 rubygems