require "ReactRenderAnywhere/version" module ReactRenderAnywhere def self.render_component(name, element, props:) content_for(:javascripts) do render partial: "common/react_render_anywhere", locals: { name: name, element: element, props: props } end content_tag(:div, nil, :class=>"react-render-anywhere", :id=>element) end end