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