Class: Frails::Component::ReactRenderer

Inherits:
Object
  • Object
show all
Includes:
RendererConcerns
Defined in:
lib/frails/component/react_renderer.rb

Instance Method Summary collapse

Instance Method Details

#render(context, options, &block) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/frails/component/react_renderer.rb', line 8

def render(context, options, &block)
  @view = context
  @component = options.delete(:component)

  klass = presenter_class
  @presenter = klass.new(@view, @component, options)

  @children = @view.capture(&block) if block_given?

  render_with_callbacks || nil
end