Class: JsonSchemaView::Renderers::ReactOnRails
- Defined in:
- lib/json_schema_view/renderers/react_on_rails.rb
Overview
Render a React component by using https://github.com/shakacode/react_on_rails.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from JsonSchemaView::Renderers::Base
Instance Method Details
#render_in(view_context, **options) ⇒ String
12 13 14 |
# File 'lib/json_schema_view/renderers/react_on_rails.rb', line 12 def render_in(view_context, **) view_context.react_component(component.component_name, props: component.props.as_json, **) end |