Module: ReactRenderAnywhere

Defined in:
lib/ReactRenderAnywhere.rb,
lib/ReactRenderAnywhere/version.rb

Constant Summary collapse

VERSION =
"0.1.3"

Instance Method Summary collapse

Instance Method Details

#render_component(name, element, props:) ⇒ Object



4
5
6
7
8
9
# File 'lib/ReactRenderAnywhere.rb', line 4

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